



"""simple docstring"""


from __future__ import annotations

import math







def  lowercase	(      _SCREAMING_SNAKE_CASE   :						float					,     _SCREAMING_SNAKE_CASE   :						int				):






				'''simple docstring'''



				_UpperCAmelCase					=    u
				for i in range(1					,     _SCREAMING_SNAKE_CASE				):
								_UpperCAmelCase					=    temp * (u - i)
				return temp







def  lowercase	(      ):






				'''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()








"""simple docstring"""


class 			_a :
			"""simple docstring"""



			def __init__(		self     :    Tuple				,   __UpperCamelCase     :    list[int]   )->None:
							_UpperCAmelCase					=    len(__UpperCamelCase   )
							_UpperCAmelCase					=    [0] * len_array

							if len_array > 0:
											_UpperCAmelCase					=    array[0]

							for i in range(1				,   __UpperCamelCase   ):
											_UpperCAmelCase					=    self.prefix_sum[i - 1] + array[i]



			def  lowercase__						(		self     :    str				,   __UpperCamelCase     :    int				,   __UpperCamelCase     :    int   )->int:
							if start == 0:
											return self.prefix_sum[end]

							return self.prefix_sum[end] - self.prefix_sum[start - 1]



			def  lowercase__						(		self     :    Any				,   __UpperCamelCase     :    int   )->bool:
							_UpperCAmelCase					=    {0}
							for sum_item in self.prefix_sum:
											if sum_item - target_sum in sums:
															return True

											sums.add(__UpperCamelCase   )

							return False


if __name__ == "__main__":
					import doctest

					doctest.testmod()



