"""simple docstring"""


from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_sentencepiece_available,
    is_tokenizers_available,
    is_torch_available,
)


UpperCAmelCase__			=    {"""configuration_fnet""": ["""FNET_PRETRAINED_CONFIG_ARCHIVE_MAP""", """FNetConfig"""]}

try:
    if not is_sentencepiece_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    UpperCAmelCase__			=    ["""FNetTokenizer"""]

try:
    if not is_tokenizers_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    UpperCAmelCase__			=    ["""FNetTokenizerFast"""]

try:
    if not is_torch_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    UpperCAmelCase__			=    [
        """FNET_PRETRAINED_MODEL_ARCHIVE_LIST""",
        """FNetForMaskedLM""",
        """FNetForMultipleChoice""",
        """FNetForNextSentencePrediction""",
        """FNetForPreTraining""",
        """FNetForQuestionAnswering""",
        """FNetForSequenceClassification""",
        """FNetForTokenClassification""",
        """FNetLayer""",
        """FNetModel""",
        """FNetPreTrainedModel""",
    ]


if TYPE_CHECKING:
    from .configuration_fnet import FNET_PRETRAINED_CONFIG_ARCHIVE_MAP, FNetConfig

    try:
        if not is_sentencepiece_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .tokenization_fnet import FNetTokenizer

    try:
        if not is_tokenizers_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .tokenization_fnet_fast import FNetTokenizerFast

    try:
        if not is_torch_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .modeling_fnet import (
            FNET_PRETRAINED_MODEL_ARCHIVE_LIST,
            FNetForMaskedLM,
            FNetForMultipleChoice,
            FNetForNextSentencePrediction,
            FNetForPreTraining,
            FNetForQuestionAnswering,
            FNetForSequenceClassification,
            FNetForTokenClassification,
            FNetLayer,
            FNetModel,
            FNetPreTrainedModel,
        )


else:
    import sys

    UpperCAmelCase__			=    _LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)

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