






from math import factorial

lowercase  :							dict[str, int]			  =    {str(digit): factorial(digit) for digit in range(10)}

def      lowerCAmelCase__	(    _a       :			int    ):
		if not isinstance(_a  ,      _a    ):
				raise TypeError("Parameter number must be int"    )

		if number < 0:
				raise ValueError("Parameter number must be greater than or equal to 0"    )

		# Converts number in string to iterate on its digits and adds its factorial.
		return sum(DIGIT_FACTORIAL[digit] for digit in str(_a    )    )

def      lowerCAmelCase__	(    _a       :			int = 60  ,      _a       :			int = 1_00_00_00    ):

		if not isinstance(_a  ,      _a    ) or not isinstance(_a  ,      _a    ):
				raise TypeError("Parameters chain_length and number_limit must be int"    )

		if chain_length <= 0 or number_limit <= 0:
				raise ValueError(
				    "Parameters chain_length and number_limit must be greater than 0"    )

		# the counter for the chains with the exact desired length
		snake_case_				:							int						 =       0
		# the cached sizes of the previous chains
		snake_case_				:							dict[int, int]						 =       {}

		for start_chain_element in range(1  ,      _a    ):
				# The temporary set will contain the elements of the chain
				snake_case_				:							Any						 =       set()
				snake_case_				:							Any						 =       0

				# Stop computing the chain when you find a cached size, a repeating item or the
				# length is greater then the desired one.
				snake_case_				:							Any						 =       start_chain_element
				while (
				    chain_element not in chain_sets_lengths
				    and chain_element not in chain_set
				    and chain_set_length <= chain_length
				):
						chain_set.add(_a    )
						chain_set_length += 1
						snake_case_				:							Any						 =       digit_factorial_sum(_a    )

				if chain_element in chain_sets_lengths:
						chain_set_length += chain_sets_lengths[chain_element]

				snake_case_				:							Union[str, Any]						 =       chain_set_length

				# If chain contains the exact amount of elements increase the counter
				if chain_set_length == chain_length:
						chains_counter += 1

		return chains_counter


if __name__ == "__main__":
							import doctest

							doctest.testmod()
							print(F"""{solution()}""")








def      lowerCAmelCase__	(    _a       :			str  ,      _a       :			int    ):
		# "extended trapezoidal rule"
		# int(f) = dx/2 * (f1 + 2f2 + ... + fn)
		snake_case_				:							Optional[Any]						 =       (boundary[1] - boundary[0]) / steps
		snake_case_				:							str						 =       boundary[0]
		snake_case_				:							Dict						 =       boundary[1]
		snake_case_				:							str						 =       make_points(_a  ,      _a  ,      _a    )
		snake_case_				:							str						 =       0.0
		y += (h / 2.0) * f(_a    )
		for i in x_i:
				# print(i)
				y += h * f(_a    )
		y += (h / 2.0) * f(_a    )
		return y

def      lowerCAmelCase__	(    _a       :			str  ,      _a       :			Optional[Any]  ,      _a       :			Tuple    ):
		snake_case_				:							Tuple						 =       a + h
		while x < (b - h):
				yield x
				snake_case_				:							List[str]						 =       x + h

def      lowerCAmelCase__	(    _a       :			Tuple    ):  # enter your function here
		snake_case_				:							Tuple						 =       (x - 0) * (x - 0)
		return y

def      lowerCAmelCase__	(    ):
		snake_case_				:							Union[str, Any]						 =       0.0  # Lower bound of integration
		snake_case_				:							List[Any]						 =       1.0  # Upper bound of integration
		snake_case_				:							Tuple						 =       10.0  # define number of steps or resolution
		snake_case_				:							List[Any]						 =       [a, b]  # define boundary of integration
		snake_case_				:							Any						 =       method_a(_a  ,      _a    )
		print(F'''y = {y}'''    )


if __name__ == "__main__":
							main()
