




'''simple docstring'''


_lowercase  =			[sum(int(c, 10) ** 2 for c in i.__str__()) for i in range(10_00_00)]
def 						lowerCamelCase__   (				a							):
						__snake_case						 =   0
						while number:
												# Increased Speed Slightly by checking every 5 digits together.
												sum_of_digits_squared += DIGITS_SQUARED[number % 100000]
												number //= 100000

						return sum_of_digits_squared


# There are 2 Chains made,
# One ends with 89 with the chain member 58 being the one which when declared first,
# there will be the least number of iterations for all the members to be checked.

# The other one ends with 1 and has only one element 1.

# So 58 and 1 are chosen to be declared at the starting.

# Changed dictionary to an array to quicken the solution
_lowercase  =			[None] * 10_00_00_00
_lowercase  =			True
_lowercase  =			False
def 						lowerCamelCase__   (				a							):

						if CHAINS[number - 1] is not None:
												return CHAINS[number - 1]  # type: ignore

						__snake_case						 =   chain(next_number(a							)							)
						__snake_case						 =   number_chain

						while number < 10000000:
												__snake_case						 =   number_chain
												number *= 10

						return number_chain
def 						lowerCamelCase__   (				a = 10000000							):
						for i in range(1    ,	a							):
												if CHAINS[i] is None:
																		chain(i + 1							)

						return CHAINS[:number].count(a							)


if __name__ == "__main__":
	import doctest

	doctest.testmod()
	print(f'''{solution() = }''')







'''simple docstring'''


from __future__ import annotations

import math
def 						lowerCamelCase__   (				a    ,	a							):
						__snake_case						 =   u
						for i in range(1    ,	a							):
												__snake_case						 =   temp * (u - i)
						return temp
def 						lowerCamelCase__   (				):
						__snake_case						 =   int(input('enter the numbers of values: '							)							)
						__snake_case						 =   []
						for _ in range(a							):
												y.append([]							)
						for i in range(a							):
												for j in range(a							):
																		y[i].append(a							)
																		__snake_case						 =   0

						print('enter the values of parameters in a list: '							)
						__snake_case						 =   list(map(a    ,	input().split()							)							)

						print('enter the values of corresponding parameters: '							)
						for i in range(a							):
												__snake_case						 =   float(input()							)

						__snake_case						 =   int(input('enter the value to interpolate: '							)							)
						__snake_case						 =   (value - x[0]) / (x[1] - x[0])

						# for calculating forward difference table

						for i in range(1    ,	a							):
												for j in range(n - i							):
																		__snake_case						 =   y[j + 1][i - 1] - y[j][i - 1]

						__snake_case						 =   y[0][0]
						for i in range(1    ,	a							):
												summ += (ucal(a    ,	a							) * y[0][i]) / math.factorial(a							)

						print(f'the value at {value} is {summ}'							)


if __name__ == "__main__":
	main()

