





from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_speech_available, is_torch_available


__UpperCAmelCase       :   Union[str, Any]				       =							{
    "configuration_audio_spectrogram_transformer": [
        "AUDIO_SPECTROGRAM_TRANSFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP",
        "ASTConfig",
    ]
}

try:
      if not is_torch_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      __UpperCAmelCase       :   Any				       =							[
          "AUDIO_SPECTROGRAM_TRANSFORMER_PRETRAINED_MODEL_ARCHIVE_LIST",
          "ASTForAudioClassification",
          "ASTModel",
          "ASTPreTrainedModel",
      ]

try:
      if not is_speech_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      __UpperCAmelCase       :   List[Any]				       =							["ASTFeatureExtractor"]

if TYPE_CHECKING:
      from .configuration_audio_spectrogram_transformer import (
          AUDIO_SPECTROGRAM_TRANSFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP,
          ASTConfig,
      )

      try:
            if not is_torch_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .modeling_audio_spectrogram_transformer import (
                AUDIO_SPECTROGRAM_TRANSFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
                ASTForAudioClassification,
                ASTModel,
                ASTPreTrainedModel,
            )

      try:
            if not is_speech_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .feature_extraction_audio_spectrogram_transformer import ASTFeatureExtractor


else:
      import sys

      __UpperCAmelCase       :   str				       =							_LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)













from __future__ import annotations

import typing
from collections import Counter







def 			A__							(    SCREAMING_SNAKE_CASE__)   ->    typing.Counter[int]:
  __snake_case:						typing.Counter[int]   =						Counter()
  for base in range(1					,					max_perimeter + 1):
    for perpendicular in range(SCREAMING_SNAKE_CASE__					,					max_perimeter + 1):
      __snake_case:						Dict   =						(base * base + perpendicular * perpendicular) ** 0.5
      if hypotenuse == int(SCREAMING_SNAKE_CASE__):
        __snake_case:						Any   =						int(base + perpendicular + hypotenuse)
        if perimeter > max_perimeter:
          continue
        triplets[perimeter] += 1
  return triplets







def 			A__							(    SCREAMING_SNAKE_CASE__ = 1000)   ->    int:
  __snake_case:						List[str]   =						pythagorean_triple(SCREAMING_SNAKE_CASE__)
  return triplets.most_common(1)[0][0]


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






