




"""simple docstring"""




from math import sqrt

import numpy as np
from sympy import symbols

# Coefficient
# Speed of light (m/s)
lowerCAmelCase__							=				299792458

# Symbols
lowerCAmelCase__,  lowerCAmelCase__,  lowerCAmelCase__,  lowerCAmelCase__							=				symbols('ct x y z')



def        _lowerCamelCase ( __a    ):
		if velocity > c:
				raise ValueError('''Speed must not exceed light speed 299,792,458 [m/s]!'''    )
		elif velocity < 1:
				# Usually the speed should be much higher than 1 (c order of magnitude)
				raise ValueError('''Speed must be greater than or equal to 1!'''    )

		return velocity / c



def        _lowerCamelCase ( __a    ):
		return 1 / sqrt(1 - beta(__a    ) ** 2    )



def        _lowerCamelCase ( __a    ):
		return np.array(
		    [
		        [gamma(__a    ), -gamma(__a    ) * beta(__a    ), 0, 0],
		        [-gamma(__a    ) * beta(__a    ), gamma(__a    ), 0, 0],
		        [0, 0, 1, 0],
		        [0, 0, 0, 1],
		    ]    )



def        _lowerCamelCase ( __a,							__a = None    ):
		# Ensure event is not empty
		if event is None:
				SCREAMING_SNAKE_CASE_						 = np.array([ct, x, y, z]    )  # Symbolic four vector
		else:
				event[0] *= c  # x0 is ct (speed of light * time)

		return transformation_matrix(__a    ) @ event


if __name__ == "__main__":
						import doctest

						doctest.testmod()

						# Example of symbolic vector:
						lowerCAmelCase__							=				transform(29979245)
						print('Example of four vector: ')
						print(f'''ct\' = {four_vector[0]}''')
						print(f'''x\' = {four_vector[1]}''')
						print(f'''y\' = {four_vector[2]}''')
						print(f'''z\' = {four_vector[3]}''')

						# Substitute symbols with numerical values
						lowerCAmelCase__							=				{ct: c, x: 1, y: 1, z: 1}
						lowerCAmelCase__							=				[four_vector[i].subs(sub_dict) for i in range(4)]

						print(f'''\n{numerical_vector}''')

"""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''')