


from itertools import permutations



def 			lowerCAmelCase (		lowerCAmelCase_ )-> bool:
				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

				lowerCAmelCase_ :      Union[str, Any]    				=				[7, 11, 13, 17]
				for i, test in enumerate(lowerCAmelCase_ ):
								if (num[i + 4] * 100 + num[i + 5] * 10 + num[i + 6]) % test != 0:
												return False
				return True



def 			lowerCAmelCase (		lowerCAmelCase_ = 10 )-> int:
				return sum(
				    int(''''''.join(map(lowerCAmelCase_ ,   lowerCAmelCase_ ) ) )
				    for num in permutations(range(lowerCAmelCase_ ) )
				    if is_substring_divisible(lowerCAmelCase_ ) )


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



from typing import TYPE_CHECKING

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


_UpperCAmelCase			:  Union[str, Any]     ={
    """configuration_llama""": ["""LLAMA_PRETRAINED_CONFIG_ARCHIVE_MAP""", """LlamaConfig"""],
}

try:
						if not is_sentencepiece_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						_UpperCAmelCase			:  Optional[Any]     =["""LlamaTokenizer"""]

try:
						if not is_tokenizers_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						_UpperCAmelCase			:  Optional[int]     =["""LlamaTokenizerFast"""]

try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						_UpperCAmelCase			:  Tuple     =[
						    """LlamaForCausalLM""",
						    """LlamaModel""",
						    """LlamaPreTrainedModel""",
						    """LlamaForSequenceClassification""",
						]


if TYPE_CHECKING:
						from .configuration_llama import LLAMA_PRETRAINED_CONFIG_ARCHIVE_MAP, LlamaConfig

						try:
												if not is_sentencepiece_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .tokenization_llama import LlamaTokenizer

						try:
												if not is_tokenizers_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .tokenization_llama_fast import LlamaTokenizerFast

						try:
												if not is_torch_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_llama import LlamaForCausalLM, LlamaForSequenceClassification, LlamaModel, LlamaPreTrainedModel


else:
						import sys

						_UpperCAmelCase			:  List[Any]     =_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)