



"""simple docstring"""
from __future__ import annotations

import math





def  lowerCamelCase_						(UpperCamelCase__		:		float     ,       UpperCamelCase__		:		int							):
    _UpperCAmelCase							:  Any											=    u
    for i in range(1     ,       UpperCamelCase__							):
        _UpperCAmelCase							:  List[Any]											=    temp * (u - i)
    return temp





def  lowerCamelCase_						():
    _UpperCAmelCase							:  Optional[int]											=    int(input('''enter the numbers of values: '''							)							)
    _UpperCAmelCase							:  list[list[float]]											=    []
    for _ in range(UpperCamelCase__							):
        y.append([]							)
    for i in range(UpperCamelCase__							):
        for j in range(UpperCamelCase__							):
            y[i].append(UpperCamelCase__							)
            _UpperCAmelCase							:  Dict											=    0

    print('''enter the values of parameters in a list: '''							)
    _UpperCAmelCase							:  Tuple											=    list(map(UpperCamelCase__     ,       input().split()							)							)

    print('''enter the values of corresponding parameters: '''							)
    for i in range(UpperCamelCase__							):
        _UpperCAmelCase							:  int											=    float(input()							)

    _UpperCAmelCase							:  List[str]											=    int(input('''enter the value to interpolate: '''							)							)
    _UpperCAmelCase							:  Optional[int]											=    (value - x[0]) / (x[1] - x[0])

    # for calculating forward difference table

    for i in range(1     ,       UpperCamelCase__							):
        for j in range(n - i							):
            _UpperCAmelCase							:  List[Any]											=    y[j + 1][i - 1] - y[j][i - 1]

    _UpperCAmelCase							:  str											=    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  lowerCamelCase_						(UpperCamelCase__		:		int     ,       UpperCamelCase__		:		int							):
    if a < 0 or b < 0:
        raise ValueError('''the value of both inputs must be positive'''							)
    _UpperCAmelCase							:  List[str]											=    str(bin(UpperCamelCase__							)							)[2:]  # remove the leading "0b"
    _UpperCAmelCase							:  str											=    str(bin(UpperCamelCase__							)							)[2:]
    _UpperCAmelCase							:  List[str]											=    max(len(UpperCamelCase__							)     ,       len(UpperCamelCase__							)							)
    return "0b" + "".join(
        str(int('''1''' in (char_a, char_b)							)							)
        for char_a, char_b in zip(a_binary.zfill(UpperCamelCase__							)     ,       b_binary.zfill(UpperCamelCase__							)							)							)


if __name__ == "__main__":
  import doctest

  doctest.testmod()


