


from __future__ import annotations

import typing
from collections import Counter




def    a__    (		snake_case__					:							int     ):
  _UpperCAmelCase		:							typing.Counter[int]							=     Counter()
  for base in range(1						,   max_perimeter + 1     ):
    for perpendicular in range(snake_case__						,   max_perimeter + 1     ):
      _UpperCAmelCase		:							Optional[int]							=     (base * base + perpendicular * perpendicular) ** 0.5
      if hypotenuse == int(snake_case__     ):
        _UpperCAmelCase		:							Tuple							=     int(base + perpendicular + hypotenuse     )
        if perimeter > max_perimeter:
          continue
        triplets[perimeter] += 1
  return triplets




def    a__    (		snake_case__					:							int = 1000     ):
  _UpperCAmelCase		:							Dict							=     pythagorean_triple(snake_case__     )
  return triplets.most_common(1     )[0][0]


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









SCREAMING_SNAKE_CASE__					:     dict[str, float]       =     {
    "joule": 1.0,
    "kilojoule": 1_000,
    "megajoule": 1_000_000,
    "gigajoule": 1_000_000_000,
    "wattsecond": 1.0,
    "watthour": 3_600,
    "kilowatthour": 3_600_000,
    "newtonmeter": 1.0,
    "calorie_nutr": 4_186.8,
    "kilocalorie_nutr": 4_186_800.00,
    "electronvolt": 1.602176634e-19,
    "britishthermalunit_it": 1_055.05_585,
    "footpound": 1.355_818,
}




def    a__    (		snake_case__					:							str						,   snake_case__					:							str						,   snake_case__					:							float     ):
  if to_type not in ENERGY_CONVERSION or from_type not in ENERGY_CONVERSION:
    _UpperCAmelCase		:							Optional[Any]							=     (
        f'''Incorrect \'from_type\' or \'to_type\' value: {from_type!r}, {to_type!r}\n'''
        f'''Valid values are: {", ".join(snake_case__     )}'''
    )
    raise ValueError(snake_case__     )
  return value * ENERGY_CONVERSION[from_type] / ENERGY_CONVERSION[to_type]


if __name__ == "__main__":
 import doctest

 doctest.testmod()





