




'''simple docstring'''




from __future__ import annotations

from collections.abc import Callable

UpperCAmelCase_												=   list[list[float | int]]

def  _UpperCamelCase   (					SCREAMING_SNAKE_CASE__      :   Union[str, Any]							,    SCREAMING_SNAKE_CASE__      :   List[str]							):
 '''simple docstring'''





 UpperCAmelCase__      				=     len(lowercase_							)
 UpperCAmelCase__      				=     [[0 for _ in range(size + 1							)] for _ in range(lowercase_							)]
 UpperCAmelCase__      				=     42
 UpperCAmelCase__      				=     42
 UpperCAmelCase__      				=     42
 UpperCAmelCase__      				=     42
 UpperCAmelCase__      				=     42
 UpperCAmelCase__      				=     42

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

  UpperCAmelCase__      				=     vector[row][0]

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

  for rowa in range(row + 1							,    lowercase_							):
   UpperCAmelCase__      				=     augmented[rowa][col] / augmented[row][col]
   UpperCAmelCase__      				=     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_							):
   UpperCAmelCase__      				=     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  _UpperCamelCase   (					SCREAMING_SNAKE_CASE__      :   Dict							):
 '''simple docstring'''





 UpperCAmelCase__      				=     len(lowercase_							)
 UpperCAmelCase__      				=     [[0 for _ in range(lowercase_							)] for _ in range(lowercase_							)]
 UpperCAmelCase__      				=     [[0] for _ in range(lowercase_							)]
 UpperCAmelCase__      				=     42
 UpperCAmelCase__      				=     42
 UpperCAmelCase__      				=     42
 UpperCAmelCase__      				=     42

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

 UpperCAmelCase__      				=     solve(lowercase_							,    lowercase_							)

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

 return interpolated_func

def  _UpperCamelCase   (					SCREAMING_SNAKE_CASE__      :   List[Any]							):
 '''simple docstring'''





 return (
     1
     - variable
     + variable**2
     - variable**3
     + variable**4
     - variable**5
     + variable**6
     - variable**7
     + variable**8
     - variable**9
     + variable**10
 )

def  _UpperCamelCase   (					SCREAMING_SNAKE_CASE__      :   Any = question_function							,    SCREAMING_SNAKE_CASE__      :   int = 10							):
 '''simple docstring'''





 UpperCAmelCase__      				=     [func(lowercase_							) for x_val in range(1							,    order + 1							)]

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

 UpperCAmelCase__      				=     0
 UpperCAmelCase__      				=     42
 UpperCAmelCase__      				=     42

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

  ret += poly(lowercase_							)

 return ret


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




def     __SCREAMING_SNAKE_CASE							(       )		->     Optional[int]:




						'''simple docstring'''







						__UpperCAmelCase			:							str	    =	[31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]

						__UpperCAmelCase			:							Union[str, Any]	    =	6
						__UpperCAmelCase			:							Optional[Any]	    =	1
						__UpperCAmelCase			:							Tuple	    =	1901

						__UpperCAmelCase			:							Any	    =	0

						while year < 2001:
												day += 7

												if (year % 4 == 0 and year % 100 != 0) or (year % 400 == 0):
																		if day > days_per_month[month - 1] and month != 2:
																								month += 1
																								__UpperCAmelCase			:							Optional[int]	    =	day - days_per_month[month - 2]
																		elif day > 29 and month == 2:
																								month += 1
																								__UpperCAmelCase			:							Optional[Any]	    =	day - 29
												else:
																		if day > days_per_month[month - 1]:
																								month += 1
																								__UpperCAmelCase			:							Optional[Any]	    =	day - days_per_month[month - 2]

												if month > 12:
																		year += 1
																		__UpperCAmelCase			:							int	    =	1

												if year < 2001 and day == 1:
																		sundays += 1
						return sundays


if __name__ == "__main__":
				print(solution())

