




'''simple docstring'''




from __future__ import annotations

import math

def       _UpperCamelCase					( SCREAMING_SNAKE_CASE__	:					Optional[Any]				,  SCREAMING_SNAKE_CASE__	:					Dict				):
 '''simple docstring'''





 UpperCAmelCase__								=			u
 for i in range(1				,  SCREAMING_SNAKE_CASE__				):
  UpperCAmelCase__								=			temp * (u - i)
 return temp

def       _UpperCamelCase					( ):
 '''simple docstring'''





 UpperCAmelCase__								=			int(input("""enter the numbers of values: """				)				)
 UpperCAmelCase__								=			[]
 for _ in range(SCREAMING_SNAKE_CASE__				):
  y.append([]				)
 for i in range(SCREAMING_SNAKE_CASE__				):
  for j in range(SCREAMING_SNAKE_CASE__				):
   y[i].append(SCREAMING_SNAKE_CASE__				)
   UpperCAmelCase__								=			0

 print("""enter the values of parameters in a list: """				)
 UpperCAmelCase__								=			list(map(SCREAMING_SNAKE_CASE__				,  input().split()				)				)

 print("""enter the values of corresponding parameters: """				)
 for i in range(SCREAMING_SNAKE_CASE__				):
  UpperCAmelCase__								=			float(input()				)

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

 # for calculating forward difference table

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

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

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


if __name__ == "__main__":
    main()







from __future__ import annotations







def  _SCREAMING_SNAKE_CASE				(   a  )      ->      int:
					if not nums:
										return 0
					__A	:						Optional[int]       =				nums[0]
					__A	:						str       =				0
					for num in nums[1:]:
										__A    ,				__A	:						Tuple       =				(
										    max_excluding + num,
										    max(a					,						a  ),
										)
					return max(a					,						a  )


if __name__ == "__main__":
				import doctest

				doctest.testmod()




