"""simple docstring"""


import json
from typing import List, Optional, Tuple

from tokenizers import normalizers

from ...tokenization_utils_fast import PreTrainedTokenizerFast
from ...utils import logging
from .tokenization_distilbert import DistilBertTokenizer


UpperCAmelCase__			=    logging.get_logger(__name__)

UpperCAmelCase__			=    {"""vocab_file""": """vocab.txt""", """tokenizer_file""": """tokenizer.json"""}

UpperCAmelCase__			=    {
    """vocab_file""": {
        """distilbert-base-uncased""": """https://huggingface.co/distilbert-base-uncased/resolve/main/vocab.txt""",
        """distilbert-base-uncased-distilled-squad""": (
            """https://huggingface.co/distilbert-base-uncased-distilled-squad/resolve/main/vocab.txt"""
        ),
        """distilbert-base-cased""": """https://huggingface.co/distilbert-base-cased/resolve/main/vocab.txt""",
        """distilbert-base-cased-distilled-squad""": (
            """https://huggingface.co/distilbert-base-cased-distilled-squad/resolve/main/vocab.txt"""
        ),
        """distilbert-base-german-cased""": """https://huggingface.co/distilbert-base-german-cased/resolve/main/vocab.txt""",
        """distilbert-base-multilingual-cased""": (
            """https://huggingface.co/distilbert-base-multilingual-cased/resolve/main/vocab.txt"""
        ),
    },
    """tokenizer_file""": {
        """distilbert-base-uncased""": """https://huggingface.co/distilbert-base-uncased/resolve/main/tokenizer.json""",
        """distilbert-base-uncased-distilled-squad""": (
            """https://huggingface.co/distilbert-base-uncased-distilled-squad/resolve/main/tokenizer.json"""
        ),
        """distilbert-base-cased""": """https://huggingface.co/distilbert-base-cased/resolve/main/tokenizer.json""",
        """distilbert-base-cased-distilled-squad""": (
            """https://huggingface.co/distilbert-base-cased-distilled-squad/resolve/main/tokenizer.json"""
        ),
        """distilbert-base-german-cased""": (
            """https://huggingface.co/distilbert-base-german-cased/resolve/main/tokenizer.json"""
        ),
        """distilbert-base-multilingual-cased""": (
            """https://huggingface.co/distilbert-base-multilingual-cased/resolve/main/tokenizer.json"""
        ),
    },
}

UpperCAmelCase__			=    {
    """distilbert-base-uncased""": 5_1_2,
    """distilbert-base-uncased-distilled-squad""": 5_1_2,
    """distilbert-base-cased""": 5_1_2,
    """distilbert-base-cased-distilled-squad""": 5_1_2,
    """distilbert-base-german-cased""": 5_1_2,
    """distilbert-base-multilingual-cased""": 5_1_2,
}


UpperCAmelCase__			=    {
    """distilbert-base-uncased""": {"""do_lower_case""": True},
    """distilbert-base-uncased-distilled-squad""": {"""do_lower_case""": True},
    """distilbert-base-cased""": {"""do_lower_case""": False},
    """distilbert-base-cased-distilled-squad""": {"""do_lower_case""": False},
    """distilbert-base-german-cased""": {"""do_lower_case""": False},
    """distilbert-base-multilingual-cased""": {"""do_lower_case""": False},
}


class 							a					(		lowerCAmelCase_ ):
    _snake_case  :	Union[str, Any]  				=				VOCAB_FILES_NAMES
    _snake_case  :	Optional[Any]  				=				PRETRAINED_VOCAB_FILES_MAP
    _snake_case  :	Dict  				=				PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
    _snake_case  :	str  				=				PRETRAINED_INIT_CONFIGURATION
    _snake_case  :	Optional[Any]  				=				['input_ids', 'attention_mask']
    _snake_case  :	List[Any]  				=				DistilBertTokenizer


    def __init__(       self						:	Tuple ,					__lowerCAmelCase						:	List[Any]=None ,					__lowerCAmelCase						:	List[Any]=None ,					__lowerCAmelCase						:	str=True ,					__lowerCAmelCase						:	Optional[int]="[UNK]" ,					__lowerCAmelCase						:	Dict="[SEP]" ,					__lowerCAmelCase						:	List[Any]="[PAD]" ,					__lowerCAmelCase						:	str="[CLS]" ,					__lowerCAmelCase						:	List[str]="[MASK]" ,					__lowerCAmelCase						:	Union[str, Any]=True ,					__lowerCAmelCase						:	Tuple=None ,					**__lowerCAmelCase						:	int ,					):
      super().__init__(
          __lowerCAmelCase ,					tokenizer_file=__lowerCAmelCase ,					do_lower_case=__lowerCAmelCase ,					unk_token=__lowerCAmelCase ,					sep_token=__lowerCAmelCase ,					pad_token=__lowerCAmelCase ,					cls_token=__lowerCAmelCase ,					mask_token=__lowerCAmelCase ,					tokenize_chinese_chars=__lowerCAmelCase ,					strip_accents=__lowerCAmelCase ,					**__lowerCAmelCase ,					)

      _UpperCAmelCase    			=   json.loads(self.backend_tokenizer.normalizer.__getstate__()       )
      if (
          normalizer_state.get("""lowercase""" ,					__lowerCAmelCase       ) != do_lower_case
          or normalizer_state.get("""strip_accents""" ,					__lowerCAmelCase       ) != strip_accents
          or normalizer_state.get("""handle_chinese_chars""" ,					__lowerCAmelCase       ) != tokenize_chinese_chars
      ):
        _UpperCAmelCase    			=   getattr(__lowerCAmelCase ,					normalizer_state.pop("""type"""       )       )
        _UpperCAmelCase    			=   do_lower_case
        _UpperCAmelCase    			=   strip_accents
        _UpperCAmelCase    			=   tokenize_chinese_chars
        _UpperCAmelCase    			=   normalizer_class(**__lowerCAmelCase       )

      _UpperCAmelCase    			=   do_lower_case


    def   lowerCAmelCase_	(       self						:	List[str] ,					__lowerCAmelCase						:	List[Any] ,					__lowerCAmelCase						:	Optional[Any]=None       ):
      _UpperCAmelCase    			=   [self.cls_token_id] + token_ids_a + [self.sep_token_id]

      if token_ids_a:
        output += token_ids_a + [self.sep_token_id]

      return output


    def   lowerCAmelCase_	(       self						:	List[Any] ,					__lowerCAmelCase						:	List[int] ,					__lowerCAmelCase						:	Optional[List[int]] = None       ):
      _UpperCAmelCase    			=   [self.sep_token_id]
      _UpperCAmelCase    			=   [self.cls_token_id]
      if token_ids_a is None:
        return len(cls + token_ids_a + sep       ) * [0]
      return len(cls + token_ids_a + sep       ) * [0] + len(token_ids_a + sep       ) * [1]


    def   lowerCAmelCase_	(       self						:	List[str] ,					__lowerCAmelCase						:	str ,					__lowerCAmelCase						:	Optional[str] = None       ):
      _UpperCAmelCase    			=   self._tokenizer.model.save(__lowerCAmelCase ,					name=__lowerCAmelCase       )
      return tuple(__lowerCAmelCase       )

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