






"""simple docstring"""


_UpperCamelCase							:       Optional[Any]       					=		{
    '0': 1,
    '1': 1,
    '2': 2,
    '3': 6,
    '4': 24,
    '5': 120,
    '6': 720,
    '7': 5040,
    '8': 4_0320,
    '9': 36_2880,
}

_UpperCamelCase							:       List[str]       					=		{145: 145}

_UpperCamelCase							:       Tuple       					=		{
    145: 0,
    169: 3,
    3_6301: 3,
    1454: 3,
    871: 2,
    4_5361: 2,
    872: 2,
}




def      snake_case    (A_ :int ):







  '''simple docstring'''

  if n in CACHE_SUM_DIGIT_FACTORIALS:
    return CACHE_SUM_DIGIT_FACTORIALS[n]
  a	:     Optional[Any]							=  sum(DIGIT_FACTORIALS[let] for let in str(A_ ) )
  a	:     Tuple							=  ret
  return ret




def      snake_case    (A_ :int      ,     A_ :set | None = None ):







  '''simple docstring'''

  a	:     Any							=  previous or set()
  if n in CHAIN_LENGTH_CACHE:
    return CHAIN_LENGTH_CACHE[n]
  a	:     Tuple							=  sum_digit_factorials(A_ )
  if next_number in previous:
    a	:     int							=  0
    return 0
  else:
    previous.add(A_ )
    a	:     List[str]							=  1 + chain_length(A_      ,     A_ )
    a	:     str							=  ret
    return ret




def      snake_case    (A_ :int = 6_0      ,     A_ :int = 1_0_0_0_0_0_0 ):







  '''simple docstring'''

  return sum(1 for i in range(1      ,     A_ ) if chain_length(A_ ) == num_terms )


if __name__ == "__main__":
   print(f'''{solution() = }''')












"""simple docstring"""


from doctest import testmod
from math import sqrt




def      snake_case    (A_ :int ):







  '''simple docstring'''

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


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




