






"""simple docstring"""







from __future__ import annotations

import math

def _a			(		_snake_case				,	_snake_case							):







      """simple docstring"""






      UpperCAmelCase          =	u
      for i in range(1				,	_snake_case							):
            UpperCAmelCase          =	temp * (u - i)
      return temp

def _a			(		):







      """simple docstring"""






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

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

      print("""enter the values of corresponding parameters: """							)
      for i in range(_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				,	_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				,	_snake_case							):
            summ += (ucal(_snake_case				,	_snake_case							) * y[0][i]) / math.factorial(_snake_case							)

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


if __name__ == "__main__":
  main()











"""simple docstring"""







_UpperCamelCase					      =  [4, 1, 7, 4, 2, 6, 4, 1, 5, 3, 7, 5]
_UpperCamelCase					      =  [3, 7, 7, 4, 2, 6, 4, 1, 5, 3, 7, 5]
_UpperCamelCase					      =  {
    0: """Sunday""",
    1: """Monday""",
    2: """Tuesday""",
    3: """Wednesday""",
    4: """Thursday""",
    5: """Friday""",
    6: """Saturday""",
}

def _a			(		_snake_case				,	_snake_case				,	_snake_case							):







      """simple docstring"""






      assert len(str(_snake_case							)							) > 2, "year should be in YYYY format"
      assert 1 <= month <= 12, "month should be between 1 to 12"
      assert 1 <= day <= 31, "day should be between 1 to 31"

      # Doomsday algorithm:
      UpperCAmelCase          =	year // 100
      UpperCAmelCase          =	(5 * (century % 4) + 2) % 7
      UpperCAmelCase          =	year % 100
      UpperCAmelCase          =	centurian % 12
      UpperCAmelCase          =	(
          (centurian // 12) + centurian_m + (centurian_m // 4) + century_anchor
      ) % 7
      UpperCAmelCase          =	(
          DOOMSDAY_NOT_LEAP[month - 1]
          if (year % 4 != 0) or (centurian == 0 and (year % 400) == 0)
          else DOOMSDAY_LEAP[month - 1]
      )
      UpperCAmelCase          =	(dooms_day + day - day_anchor) % 7
      return WEEK_DAY_NAMES[week_day]


if __name__ == "__main__":
  import doctest

  doctest.testmod()



