


"""simple docstring"""





from __future__ import annotations



class 		snake_case_:






     def __init__(						self	:       Tuple       ,					UpperCamelCase_	:       int					):
           lowerCAmelCase       :						Tuple							= value
           lowerCAmelCase       :						Node | None							= None
           lowerCAmelCase       :						Node | None							= None



class 		snake_case_:
     __UpperCamelCase	=       42






     def __init__(						self	:       List[str]					):
           lowerCAmelCase       :						str							= 0






     def   lowerCamelCase__  (						self	:       int       ,					UpperCamelCase_	:       Node | None       ,					UpperCamelCase_	:       int					):
           if node is None:
                 return

           if path_sum == self.target:
                 self.paths += 1

           if node.left:
                 self.depth_first_search(node.left       ,					path_sum + node.left.value					)
           if node.right:
                 self.depth_first_search(node.right       ,					path_sum + node.right.value					)






     def   lowerCamelCase__  (						self	:       int       ,					UpperCamelCase_	:       Node | None       ,					UpperCamelCase_	:       int | None = None					):
           if node is None:
                 return 0
           if target is not None:
                 lowerCAmelCase       :						List[Any]							= target

           self.depth_first_search(UpperCamelCase_       ,					node.value					)
           self.path_sum(node.left					)
           self.path_sum(node.right					)

           return self.paths


if __name__ == "__main__":
 import doctest

 doctest.testmod()






"""simple docstring"""





from doctest import testmod
from math import sqrt


def   _snake_case    (    _snake_case					:      int      ):
      lowerCAmelCase       :						list[int]							= []
      if num < 1:
            return facs
      facs.append(1      )
      if num == 1:
            return facs
      facs.append(_snake_case      )
      for i in range(2			, int(sqrt(_snake_case      )      ) + 1      ):
            if num % i == 0:  # If i is a factor of num
                  facs.append(_snake_case      )
                  lowerCAmelCase       :						Dict							= num // i  # num//i is the other factor of num
                  if d != i:  # If d and i are distinct
                        facs.append(_snake_case      )  # we have found another factor
      facs.sort()
      return facs


if __name__ == "__main__":
 testmod(name='''factors_of_a_number''', verbose=True)


