





from __future__ import annotations

import math
def       __UpperCamelCase					(      lowercase__						:							List[str]		,     lowercase__						:							int		)						->   Optional[int]:
    '''simple docstring'''





    lowerCAmelCase_       :						Optional[int]							= u
    for i in range(1		,     UpperCAmelCase_		):
        lowerCAmelCase_       :						Tuple							= temp * (u - i)
    return temp
def       __UpperCamelCase					(      )						->   int:
    '''simple docstring'''





    lowerCAmelCase_       :						Dict							= int(input("""enter the numbers of values: """		)		)
    lowerCAmelCase_       :						list[list[float]]							= []
    for _ in range(UpperCAmelCase_		):
        y.append([]		)
    for i in range(UpperCAmelCase_		):
        for j in range(UpperCAmelCase_		):
            y[i].append(UpperCAmelCase_		)
            lowerCAmelCase_       :						Optional[Any]							= 0

    print("""enter the values of parameters in a list: """		)
    lowerCAmelCase_       :						Optional[Any]							= list(map(UpperCAmelCase_		,     input().split()		)		)

    print("""enter the values of corresponding parameters: """		)
    for i in range(UpperCAmelCase_		):
        lowerCAmelCase_       :						Tuple							= float(input()		)

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

    # for calculating forward difference table

    for i in range(1		,     UpperCAmelCase_		):
        for j in range(n - i		):
            lowerCAmelCase_       :						Optional[Any]							= y[j + 1][i - 1] - y[j][i - 1]

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

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


if __name__ == "__main__":
  main()







'''simple docstring'''
def A__       (	UpperCAmelCase_    ,    UpperCAmelCase_				):
						return int((input_a, input_a).count(0				) != 0				)






def A__       (	):
						assert nand_gate(0    ,    0				) == 1
						assert nand_gate(0    ,    1				) == 1
						assert nand_gate(1    ,    0				) == 1
						assert nand_gate(1    ,    1				) == 0


if __name__ == "__main__":
					print(nand_gate(0, 0))
					print(nand_gate(0, 1))
					print(nand_gate(1, 0))
					print(nand_gate(1, 1))


