
"""simple docstring"""




def 			_lowerCAmelCase		(		):






  """simple docstring"""



  for n in range(1			,					1_000_000    ):
    yield n * (n + 1) // 2




def 			_lowerCAmelCase		(		_UpperCamelCase    ):






  """simple docstring"""



  _lowercase:      List[Any]   			=  1
  _lowercase:      List[Any]   			=  2
  while i * i <= n:
    _lowercase:      str   			=  0
    while n % i == 0:
      n //= i
      multiplicity += 1
    divisors_count *= multiplicity + 1
    i += 1
  if n > 1:
    divisors_count *= 2
  return divisors_count




def 			_lowerCAmelCase		(		):






  """simple docstring"""



  return next(i for i in triangle_number_generator() if count_divisors(_UpperCamelCase    ) > 500    )


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


"""simple docstring"""




from __future__ import annotations

import typing
from collections import Counter




def 			_lowerCAmelCase		(		_UpperCamelCase    ):






  """simple docstring"""



  _lowercase:      typing.Counter[int]   			=  Counter()
  for base in range(1			,					max_perimeter + 1    ):
    for perpendicular in range(_UpperCamelCase			,					max_perimeter + 1    ):
      _lowercase:      str   			=  (base * base + perpendicular * perpendicular) ** 0.5
      if hypotenuse == int(_UpperCamelCase    ):
        _lowercase:      str   			=  int(base + perpendicular + hypotenuse    )
        if perimeter > max_perimeter:
          continue
        triplets[perimeter] += 1
  return triplets




def 			_lowerCAmelCase		(		_UpperCamelCase = 1_000    ):






  """simple docstring"""



  _lowercase:      int   			=  pythagorean_triple(_UpperCamelCase    )
  return triplets.most_common(1    )[0][0]


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