



'''simple docstring'''


from __future__ import annotations

from collections.abc import Callable

lowercase_   :					Union[str, Any]        =     list[list[float | int]]







def   SCREAMING_SNAKE_CASE					(					lowercase_     :   Matrix			,	lowercase_     :   Matrix    ):
						lowercase   =				len(lowercase_    )
						lowercase   =				[[0 for _ in range(size + 1    )] for _ in range(lowercase_    )]
						lowercase   =				42
						lowercase   =				42
						lowercase   =				42
						lowercase   =				42
						lowercase   =				42
						lowercase   =				42

						for row in range(lowercase_    ):
												for col in range(lowercase_    ):
																		lowercase   =				matrix[row][col]

												lowercase   =				vector[row][0]

						lowercase   =				0
						lowercase   =				0
						while row < size and col < size:
												# pivoting
												lowercase   =				max((abs(augmented[rowa][col]    ), rowa) for rowa in range(lowercase_			,	lowercase_    )    )[
												    1
												]
												if augmented[pivot_row][col] == 0:
																		col += 1
																		continue
												else:
																		lowercase  , lowercase   =				augmented[pivot_row], augmented[row]

												for rowa in range(row + 1			,	lowercase_    ):
																		lowercase   =				augmented[rowa][col] / augmented[row][col]
																		lowercase   =				0
																		for cola in range(col + 1			,	size + 1    ):
																								augmented[rowa][cola] -= augmented[row][cola] * ratio

												row += 1
												col += 1

						# back substitution
						for col in range(1			,	lowercase_    ):
												for row in range(lowercase_    ):
																		lowercase   =				augmented[row][col] / augmented[col][col]
																		for cola in range(lowercase_			,	size + 1    ):
																								augmented[row][cola] -= augmented[col][cola] * ratio

    # round to get rid of numbers like 2.000000000000004
						return [
						    [round(augmented[row][size] / augmented[row][row]			,	10    )] for row in range(lowercase_    )
						]







def   SCREAMING_SNAKE_CASE					(					lowercase_     :   list[int]    ):
						lowercase   =				len(lowercase_    )
						lowercase   =				[[0 for _ in range(lowercase_    )] for _ in range(lowercase_    )]
						lowercase   =				[[0] for _ in range(lowercase_    )]
						lowercase   =				42
						lowercase   =				42
						lowercase   =				42
						lowercase   =				42

						for x_val, y_val in enumerate(lowercase_    ):
												for col in range(lowercase_    ):
																		lowercase   =				(x_val + 1) ** (size - col - 1)
												lowercase   =				y_val

						lowercase   =				solve(lowercase_			,	lowercase_    )

						def interpolated_func(lowercase_     :   int    ) -> int:
												return sum(
												    round(coeffs[x_val][0]    ) * (var ** (size - x_val - 1))
												    for x_val in range(lowercase_    )    )

						return interpolated_func







def   SCREAMING_SNAKE_CASE					(					lowercase_     :   int    ):
						return (
						    1
						    - variable
						    + variable**2
						    - variable**3
						    + variable**4
						    - variable**5
						    + variable**6
						    - variable**7
						    + variable**8
						    - variable**9
						    + variable**10
						)







def   SCREAMING_SNAKE_CASE					(					lowercase_     :   Callable[[int], int] = question_function			,	lowercase_     :   int = 10    ):
						lowercase   =				[func(lowercase_    ) for x_val in range(1			,	order + 1    )]

						lowercase   =				[
						    interpolate(data_points[:max_coeff]    ) for max_coeff in range(1			,	order + 1    )
						]

						lowercase   =				0
						lowercase   =				42
						lowercase   =				42

						for poly in polynomials:
												lowercase   =				1
												while func(lowercase_    ) == poly(lowercase_    ):
																		x_val += 1

												ret += poly(lowercase_    )

						return ret


if __name__ == "__main__":
						print(f'''{solution() = }''')





'''simple docstring'''



from ..utils import DummyObject, requires_backends



class 				_snake_case					(   metaclass=a_			):
  SCREAMING_SNAKE_CASE			:       int				=     ['''torch''', '''transformers''', '''onnx''']

  def __init__(				self      , *_SCREAMING_SNAKE_CASE      , **_SCREAMING_SNAKE_CASE	):





      '''simple docstring'''

      requires_backends(self      , ['torch', 'transformers', 'onnx']	)

  @classmethod
  def   _SCREAMING_SNAKE_CASE				(				cls      , *_SCREAMING_SNAKE_CASE      , **_SCREAMING_SNAKE_CASE	):





      '''simple docstring'''

      requires_backends(cls      , ['torch', 'transformers', 'onnx']	)


  @classmethod
  def   _SCREAMING_SNAKE_CASE				(				cls      , *_SCREAMING_SNAKE_CASE      , **_SCREAMING_SNAKE_CASE	):





      '''simple docstring'''

      requires_backends(cls      , ['torch', 'transformers', 'onnx']	)



class 				_snake_case					(   metaclass=a_			):
  SCREAMING_SNAKE_CASE			:       List[Any]				=     ['''torch''', '''transformers''', '''onnx''']

  def __init__(				self      , *_SCREAMING_SNAKE_CASE      , **_SCREAMING_SNAKE_CASE	):





      '''simple docstring'''

      requires_backends(self      , ['torch', 'transformers', 'onnx']	)

  @classmethod
  def   _SCREAMING_SNAKE_CASE				(				cls      , *_SCREAMING_SNAKE_CASE      , **_SCREAMING_SNAKE_CASE	):





      '''simple docstring'''

      requires_backends(cls      , ['torch', 'transformers', 'onnx']	)


  @classmethod
  def   _SCREAMING_SNAKE_CASE				(				cls      , *_SCREAMING_SNAKE_CASE      , **_SCREAMING_SNAKE_CASE	):





      '''simple docstring'''

      requires_backends(cls      , ['torch', 'transformers', 'onnx']	)



class 				_snake_case					(   metaclass=a_			):
  SCREAMING_SNAKE_CASE			:       int				=     ['''torch''', '''transformers''', '''onnx''']

  def __init__(				self      , *_SCREAMING_SNAKE_CASE      , **_SCREAMING_SNAKE_CASE	):





      '''simple docstring'''

      requires_backends(self      , ['torch', 'transformers', 'onnx']	)

  @classmethod
  def   _SCREAMING_SNAKE_CASE				(				cls      , *_SCREAMING_SNAKE_CASE      , **_SCREAMING_SNAKE_CASE	):





      '''simple docstring'''

      requires_backends(cls      , ['torch', 'transformers', 'onnx']	)


  @classmethod
  def   _SCREAMING_SNAKE_CASE				(				cls      , *_SCREAMING_SNAKE_CASE      , **_SCREAMING_SNAKE_CASE	):





      '''simple docstring'''

      requires_backends(cls      , ['torch', 'transformers', 'onnx']	)



class 				_snake_case					(   metaclass=a_			):
  SCREAMING_SNAKE_CASE			:       Dict				=     ['''torch''', '''transformers''', '''onnx''']

  def __init__(				self      , *_SCREAMING_SNAKE_CASE      , **_SCREAMING_SNAKE_CASE	):





      '''simple docstring'''

      requires_backends(self      , ['torch', 'transformers', 'onnx']	)

  @classmethod
  def   _SCREAMING_SNAKE_CASE				(				cls      , *_SCREAMING_SNAKE_CASE      , **_SCREAMING_SNAKE_CASE	):





      '''simple docstring'''

      requires_backends(cls      , ['torch', 'transformers', 'onnx']	)


  @classmethod
  def   _SCREAMING_SNAKE_CASE				(				cls      , *_SCREAMING_SNAKE_CASE      , **_SCREAMING_SNAKE_CASE	):





      '''simple docstring'''

      requires_backends(cls      , ['torch', 'transformers', 'onnx']	)



class 				_snake_case					(   metaclass=a_			):
  SCREAMING_SNAKE_CASE			:       List[Any]				=     ['''torch''', '''transformers''', '''onnx''']

  def __init__(				self      , *_SCREAMING_SNAKE_CASE      , **_SCREAMING_SNAKE_CASE	):





      '''simple docstring'''

      requires_backends(self      , ['torch', 'transformers', 'onnx']	)

  @classmethod
  def   _SCREAMING_SNAKE_CASE				(				cls      , *_SCREAMING_SNAKE_CASE      , **_SCREAMING_SNAKE_CASE	):





      '''simple docstring'''

      requires_backends(cls      , ['torch', 'transformers', 'onnx']	)


  @classmethod
  def   _SCREAMING_SNAKE_CASE				(				cls      , *_SCREAMING_SNAKE_CASE      , **_SCREAMING_SNAKE_CASE	):





      '''simple docstring'''

      requires_backends(cls      , ['torch', 'transformers', 'onnx']	)



class 				_snake_case					(   metaclass=a_			):
  SCREAMING_SNAKE_CASE			:       Optional[Any]				=     ['''torch''', '''transformers''', '''onnx''']

  def __init__(				self      , *_SCREAMING_SNAKE_CASE      , **_SCREAMING_SNAKE_CASE	):





      '''simple docstring'''

      requires_backends(self      , ['torch', 'transformers', 'onnx']	)

  @classmethod
  def   _SCREAMING_SNAKE_CASE				(				cls      , *_SCREAMING_SNAKE_CASE      , **_SCREAMING_SNAKE_CASE	):





      '''simple docstring'''

      requires_backends(cls      , ['torch', 'transformers', 'onnx']	)


  @classmethod
  def   _SCREAMING_SNAKE_CASE				(				cls      , *_SCREAMING_SNAKE_CASE      , **_SCREAMING_SNAKE_CASE	):





      '''simple docstring'''

      requires_backends(cls      , ['torch', 'transformers', 'onnx']	)





