
"""simple docstring"""





from __future__ import annotations







def 	__a     (		__lowerCamelCase,		__lowerCamelCase = None,		__lowerCamelCase = None  ):
   if start is None:
      UpperCAmelCase_					:					Optional[Any]			     =    0

   if end is None:
      UpperCAmelCase_					:					Union[str, Any]			     =    len(__lowerCamelCase  ) - 1

   if start >= end:
      return

   UpperCAmelCase_					:					Any			     =    (start + end) // 2

   slowsort(__lowerCamelCase,		__lowerCamelCase,		__lowerCamelCase  )
   slowsort(__lowerCamelCase,		mid + 1,		__lowerCamelCase  )

   if sequence[end] < sequence[mid]:
      UpperCAmelCase_     ,   UpperCAmelCase_					:					List[Any]			     =    sequence[mid], sequence[end]

   slowsort(__lowerCamelCase,		__lowerCamelCase,		end - 1  )


if __name__ == "__main__":
    from doctest import testmod

    testmod()




"""simple docstring"""





from __future__ import annotations

import math







def 	__a     (		__lowerCamelCase,		__lowerCamelCase  ):
   UpperCAmelCase_					:					Any			     =    u
   for i in range(1,		__lowerCamelCase  ):
      UpperCAmelCase_					:					int			     =    temp * (u - i)
   return temp







def 	__a     (		):
   UpperCAmelCase_					:					str			     =    int(input("enter the numbers of values: "  )  )
   UpperCAmelCase_					:					list[list[float]]			     =    []
   for _ in range(__lowerCamelCase  ):
      y.append([]  )
   for i in range(__lowerCamelCase  ):
      for j in range(__lowerCamelCase  ):
         y[i].append(__lowerCamelCase  )
         UpperCAmelCase_					:					Tuple			     =    0

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

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

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

   # for calculating forward difference table

   for i in range(1,		__lowerCamelCase  ):
      for j in range(n - i  ):
         UpperCAmelCase_					:					Union[str, Any]			     =    y[j + 1][i - 1] - y[j][i - 1]

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

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


if __name__ == "__main__":
    main()


