


from .imports import is_tqdm_available


if is_tqdm_available():
   from tqdm.auto import tqdm as _tqdm

from ..state import PartialState




def      UpperCamelCase     (   _a = True							,		*_a							,		**_a		)       ->				Optional[int]:
     '''simple docstring'''





     if not is_tqdm_available():
          raise ImportError('''Accelerate\'s `tqdm` module requires `tqdm` to be installed. Please run `pip install tqdm`.'''		)
     lowercase_							:Optional[Any]			     =							False
     if main_process_only:
          lowercase_							:Optional[int]			     =							PartialState().local_process_index == 0
     return _tqdm(*_a							,		**_a							,		disable=_a		)


"""simple docstring"""


from __future__ import annotations

import typing
from collections import Counter






def      __UpperCAmelCase       (      lowercase		):







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






def      __UpperCAmelCase       (      lowercase = 10_00		):







  """simple docstring"""
  _UpperCAmelCase    			=   pythagorean_triple(lowercase		)
  return triplets.most_common(1		)[0][0]


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