
from __future__ import annotations

import typing
from collections import Counter



def        UpperCamelCase    (							lowerCAmelCase__		):
					'''simple docstring'''
					lowercase							=						Counter()
					for base in range(1 ,			max_perimeter + 1		):
										for perpendicular in range(lowerCAmelCase__ ,			max_perimeter + 1		):
															lowercase							=						(base * base + perpendicular * perpendicular) ** 0.5
															if hypotenuse == int(lowerCAmelCase__		):
																				lowercase							=						int(base + perpendicular + hypotenuse		)
																				if perimeter > max_perimeter:
																									continue
																				triplets[perimeter] += 1
					return triplets



def        UpperCamelCase    (							lowerCAmelCase__ = 1000		):
					'''simple docstring'''
					lowercase							=						pythagorean_triple(lowerCAmelCase__		)
					return triplets.most_common(1		)[0][0]


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






from functools import lru_cache



@lru_cache
def        UpperCamelCase    (							lowerCAmelCase__		):
					'''simple docstring'''
					if num < 0:
										raise ValueError('''Number should not be negative.'''		)

					return 1 if num in (0, 1) else num * factorial(num - 1		)


if __name__ == "__main__":
							import doctest

							doctest.testmod()




