


'''simple docstring'''



import json
from typing import List, Optional, Tuple

from tokenizers import pre_tokenizers, processors

from ...tokenization_utils_base import AddedToken, BatchEncoding
from ...tokenization_utils_fast import PreTrainedTokenizerFast
from ...utils import logging
from .tokenization_roberta import RobertaTokenizer


__A	=logging.get_logger(__name__)

__A	={'''vocab_file''': '''vocab.json''', '''merges_file''': '''merges.txt''', '''tokenizer_file''': '''tokenizer.json'''}

__A	={
    '''vocab_file''': {
        '''roberta-base''': '''https://huggingface.co/roberta-base/resolve/main/vocab.json''',
        '''roberta-large''': '''https://huggingface.co/roberta-large/resolve/main/vocab.json''',
        '''roberta-large-mnli''': '''https://huggingface.co/roberta-large-mnli/resolve/main/vocab.json''',
        '''distilroberta-base''': '''https://huggingface.co/distilroberta-base/resolve/main/vocab.json''',
        '''roberta-base-openai-detector''': '''https://huggingface.co/roberta-base-openai-detector/resolve/main/vocab.json''',
        '''roberta-large-openai-detector''': (
            '''https://huggingface.co/roberta-large-openai-detector/resolve/main/vocab.json'''
        ),
    },
    '''merges_file''': {
        '''roberta-base''': '''https://huggingface.co/roberta-base/resolve/main/merges.txt''',
        '''roberta-large''': '''https://huggingface.co/roberta-large/resolve/main/merges.txt''',
        '''roberta-large-mnli''': '''https://huggingface.co/roberta-large-mnli/resolve/main/merges.txt''',
        '''distilroberta-base''': '''https://huggingface.co/distilroberta-base/resolve/main/merges.txt''',
        '''roberta-base-openai-detector''': '''https://huggingface.co/roberta-base-openai-detector/resolve/main/merges.txt''',
        '''roberta-large-openai-detector''': (
            '''https://huggingface.co/roberta-large-openai-detector/resolve/main/merges.txt'''
        ),
    },
    '''tokenizer_file''': {
        '''roberta-base''': '''https://huggingface.co/roberta-base/resolve/main/tokenizer.json''',
        '''roberta-large''': '''https://huggingface.co/roberta-large/resolve/main/tokenizer.json''',
        '''roberta-large-mnli''': '''https://huggingface.co/roberta-large-mnli/resolve/main/tokenizer.json''',
        '''distilroberta-base''': '''https://huggingface.co/distilroberta-base/resolve/main/tokenizer.json''',
        '''roberta-base-openai-detector''': (
            '''https://huggingface.co/roberta-base-openai-detector/resolve/main/tokenizer.json'''
        ),
        '''roberta-large-openai-detector''': (
            '''https://huggingface.co/roberta-large-openai-detector/resolve/main/tokenizer.json'''
        ),
    },
}

__A	={
    '''roberta-base''': 5_12,
    '''roberta-large''': 5_12,
    '''roberta-large-mnli''': 5_12,
    '''distilroberta-base''': 5_12,
    '''roberta-base-openai-detector''': 5_12,
    '''roberta-large-openai-detector''': 5_12,
}


class 		_snake_case					(     UpperCamelCase__	):
					lowerCAmelCase      :List[str]   =					VOCAB_FILES_NAMES
					lowerCAmelCase      :Optional[int]   =					PRETRAINED_VOCAB_FILES_MAP
					lowerCAmelCase      :Optional[int]   =					PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
					lowerCAmelCase      :Any   =					["""input_ids""", """attention_mask"""]
					lowerCAmelCase      :Union[str, Any]   =					RobertaTokenizer




					def __init__(      self							,							_lowerCamelCase=None							,							_lowerCamelCase=None							,							_lowerCamelCase=None							,							_lowerCamelCase="replace"							,							_lowerCamelCase="<s>"							,							_lowerCamelCase="</s>"							,							_lowerCamelCase="</s>"							,							_lowerCamelCase="<s>"							,							_lowerCamelCase="<unk>"							,							_lowerCamelCase="<pad>"							,							_lowerCamelCase="<mask>"							,							_lowerCamelCase=False							,							_lowerCamelCase=True							,							**_lowerCamelCase							,							):
								super().__init__(
								    _lowerCamelCase							,							_lowerCamelCase							,							tokenizer_file=_lowerCamelCase							,							errors=_lowerCamelCase							,							bos_token=_lowerCamelCase							,							eos_token=_lowerCamelCase							,							sep_token=_lowerCamelCase							,							cls_token=_lowerCamelCase							,							unk_token=_lowerCamelCase							,							pad_token=_lowerCamelCase							,							mask_token=_lowerCamelCase							,							add_prefix_space=_lowerCamelCase							,							trim_offsets=_lowerCamelCase							,							**_lowerCamelCase							,							)

								UpperCAmelCase__  :					List[Any]        =     json.loads(self.backend_tokenizer.pre_tokenizer.__getstate__())
								if pre_tok_state.get("""add_prefix_space"""							,							_lowerCamelCase) != add_prefix_space:
											UpperCAmelCase__  :					int        =     getattr(_lowerCamelCase							,							pre_tok_state.pop("""type"""))
											UpperCAmelCase__  :					List[Any]        =     add_prefix_space
											UpperCAmelCase__  :					Optional[int]        =     pre_tok_class(**_lowerCamelCase)

								UpperCAmelCase__  :					Union[str, Any]        =     add_prefix_space

								UpperCAmelCase__  :					Dict        =     """post_processor"""
								UpperCAmelCase__  :					Tuple        =     getattr(self.backend_tokenizer							,							_lowerCamelCase							,							_lowerCamelCase)
								if tokenizer_component_instance:
											UpperCAmelCase__  :					str        =     json.loads(tokenizer_component_instance.__getstate__())

											# The lists 'sep' and 'cls' must be cased in tuples for the object `post_processor_class`
											if "sep" in state:
														UpperCAmelCase__  :					str        =     tuple(state["""sep"""])
											if "cls" in state:
														UpperCAmelCase__  :					Dict        =     tuple(state["""cls"""])

											UpperCAmelCase__  :					Optional[Any]        =     False

											if state.get("""add_prefix_space"""							,							_lowerCamelCase) != add_prefix_space:
														UpperCAmelCase__  :					Any        =     add_prefix_space
														UpperCAmelCase__  :					Dict        =     True

											if state.get("""trim_offsets"""							,							_lowerCamelCase) != trim_offsets:
														UpperCAmelCase__  :					Union[str, Any]        =     trim_offsets
														UpperCAmelCase__  :					Tuple        =     True

											if changes_to_apply:
														UpperCAmelCase__  :					int        =     getattr(_lowerCamelCase							,							state.pop("""type"""))
														UpperCAmelCase__  :					str        =     component_class(**_lowerCamelCase)
														setattr(self.backend_tokenizer							,							_lowerCamelCase							,							_lowerCamelCase)




					@property
					def 				snake_case__						(      self):
								if self._mask_token is None:
											if self.verbose:
														logger.error("""Using mask_token, but it is not set yet.""")
											return None
								return str(self._mask_token)




					@mask_token.setter
					def 				snake_case__						(      self							,							_lowerCamelCase):
								UpperCAmelCase__  :					Any        =     AddedToken(_lowerCamelCase							,							lstrip=_lowerCamelCase							,							rstrip=_lowerCamelCase) if isinstance(_lowerCamelCase							,							_lowerCamelCase) else value
								UpperCAmelCase__  :					Dict        =     value




					def 				snake_case__						(      self							,							*_lowerCamelCase							,							**_lowerCamelCase):
								UpperCAmelCase__  :					int        =     kwargs.get("""is_split_into_words"""							,							_lowerCamelCase)
								assert self.add_prefix_space or not is_split_into_words, (
								    f'''You need to instantiate {self.__class__.__name__} with add_prefix_space=True '''
								    "to use it with pretokenized inputs."
								)

								return super()._batch_encode_plus(*_lowerCamelCase							,							**_lowerCamelCase)




					def 				snake_case__						(      self							,							*_lowerCamelCase							,							**_lowerCamelCase):
								UpperCAmelCase__  :					Tuple        =     kwargs.get("""is_split_into_words"""							,							_lowerCamelCase)

								assert self.add_prefix_space or not is_split_into_words, (
								    f'''You need to instantiate {self.__class__.__name__} with add_prefix_space=True '''
								    "to use it with pretokenized inputs."
								)

								return super()._encode_plus(*_lowerCamelCase							,							**_lowerCamelCase)




					def 				snake_case__						(      self							,							_lowerCamelCase							,							_lowerCamelCase = None):
								UpperCAmelCase__  :					Any        =     self._tokenizer.model.save(_lowerCamelCase							,							name=_lowerCamelCase)
								return tuple(_lowerCamelCase)




					def 				snake_case__						(      self							,							_lowerCamelCase							,							_lowerCamelCase=None):
								UpperCAmelCase__  :					str        =     [self.bos_token_id] + token_ids_a + [self.eos_token_id]
								if token_ids_a is None:
											return output

								return output + [self.eos_token_id] + token_ids_a + [self.eos_token_id]




					def 				snake_case__						(      self							,							_lowerCamelCase							,							_lowerCamelCase = None):
								UpperCAmelCase__  :					Optional[Any]        =     [self.sep_token_id]
								UpperCAmelCase__  :					List[Any]        =     [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 + sep + token_ids_a + sep) * [0]



'''simple docstring'''



from itertools import permutations







def     _UpperCamelCase      (		UpperCamelCase__					):
			if num[3] % 2 != 0:
						return False

			if (num[2] + num[3] + num[4]) % 3 != 0:
						return False

			if num[5] % 5 != 0:
						return False

			UpperCAmelCase__  :					Optional[int]        =     [7, 1_1, 1_3, 1_7]
			for i, test in enumerate(UpperCamelCase__					):
						if (num[i + 4] * 1_0_0 + num[i + 5] * 1_0 + num[i + 6]) % test != 0:
									return False
			return True







def     _UpperCamelCase      (		UpperCamelCase__ = 1_0					):
			return sum(
			    int("""""".join(map(UpperCamelCase__ ,      UpperCamelCase__					)					)					)
			    for num in permutations(range(UpperCamelCase__					)					)
			    if is_substring_divisible(UpperCamelCase__					)					)


if __name__ == "__main__":
		print(f"""{solution() = }""")