

"""simple docstring"""




__A	:       str        =						{
    '0': 1,
    '1': 1,
    '2': 2,
    '3': 6,
    '4': 24,
    '5': 1_20,
    '6': 7_20,
    '7': 50_40,
    '8': 4_03_20,
    '9': 36_28_80,
}

__A	:       List[str]        =						{1_45: 1_45}

__A	:       str        =						{
    1_45: 0,
    1_69: 3,
    3_63_01: 3,
    14_54: 3,
    8_71: 2,
    4_53_61: 2,
    8_72: 2,
}
def   __SCREAMING_SNAKE_CASE		(		lowercase__ ):
					"""simple docstring"""
					if n in CACHE_SUM_DIGIT_FACTORIALS:
										return CACHE_SUM_DIGIT_FACTORIALS[n]
					A     =   sum(DIGIT_FACTORIALS[let] for let in str(lowercase__ ) )
					A     =   ret
					return ret
def   __SCREAMING_SNAKE_CASE		(		lowercase__     ,				lowercase__ = None ):
					"""simple docstring"""
					A     =   previous or set()
					if n in CHAIN_LENGTH_CACHE:
										return CHAIN_LENGTH_CACHE[n]
					A     =   sum_digit_factorials(lowercase__ )
					if next_number in previous:
										A     =   0
										return 0
					else:
										previous.add(lowercase__ )
										A     =   1 + chain_length(lowercase__     ,				lowercase__ )
										A     =   ret
										return ret
def   __SCREAMING_SNAKE_CASE		(		lowercase__ = 60     ,				lowercase__ = 1_000_000 ):
					"""simple docstring"""
					return sum(1 for i in range(1     ,				lowercase__ ) if chain_length(lowercase__ ) == num_terms )


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








"""simple docstring"""




from __future__ import annotations
def   __SCREAMING_SNAKE_CASE		(		lowercase__     ,				lowercase__ ):
					"""simple docstring"""
					A     =   {}
					for index, val in enumerate(lowercase__ ):
										A     =   target - val
										if compl in chk_map:
															return [chk_map[compl], index]
										A     =   index
					return []


if __name__ == "__main__":
	import doctest

	doctest.testmod()
	print(f"""{two_sum([2, 7, 11, 15], 9) = }""")





