




"""simple docstring"""




def        _lowerCamelCase ( __a    ):

		if not grid or not grid[0]:
				raise TypeError('''The grid does not contain the appropriate information'''    )

		for cell_n in range(1,							len(grid[0]    )    ):
				grid[0][cell_n] += grid[0][cell_n - 1]
		SCREAMING_SNAKE_CASE_						 = grid[0]

		for row_n in range(1,							len(a__    )    ):
				SCREAMING_SNAKE_CASE_						 = grid[row_n]
				SCREAMING_SNAKE_CASE_						 = fill_row(a__,							a__    )
				SCREAMING_SNAKE_CASE_						 = grid[row_n]

		return grid[-1][-1]



def        _lowerCamelCase ( __a,							__a    ):
		current_row[0] += row_above[0]
		for cell_n in range(1,							len(a__    )    ):
				current_row[cell_n] += min(current_row[cell_n - 1],							row_above[cell_n]    )

		return current_row


if __name__ == "__main__":
						import doctest

						doctest.testmod()

"""simple docstring"""




from __future__ import annotations

import typing
from collections import Counter



def        _lowerCamelCase ( __a    ):
		SCREAMING_SNAKE_CASE_						 = Counter()
		for base in range(1,							max_perimeter + 1    ):
				for perpendicular in range(__a,							max_perimeter + 1    ):
						SCREAMING_SNAKE_CASE_						 = (base * base + perpendicular * perpendicular) ** 0.5
						if hypotenuse == int(__a    ):
								SCREAMING_SNAKE_CASE_						 = int(base + perpendicular + hypotenuse    )
								if perimeter > max_perimeter:
										continue
								triplets[perimeter] += 1
		return triplets



def        _lowerCamelCase ( __a = 1_000    ):
		SCREAMING_SNAKE_CASE_						 = pythagorean_triple(__a    )
		return triplets.most_common(1    )[0][0]


if __name__ == "__main__":
						print(f'''Perimeter {solution()} has maximum solutions''')