





from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_flax_available,
    is_tf_available,
    is_torch_available,
)


SCREAMING_SNAKE_CASE_						       =   {"""configuration_unispeech""": ["""UNISPEECH_PRETRAINED_CONFIG_ARCHIVE_MAP""", """UniSpeechConfig"""]}

try:
      if not is_torch_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      SCREAMING_SNAKE_CASE_						       =   [
          """UNISPEECH_PRETRAINED_MODEL_ARCHIVE_LIST""",
          """UniSpeechForCTC""",
          """UniSpeechForPreTraining""",
          """UniSpeechForSequenceClassification""",
          """UniSpeechModel""",
          """UniSpeechPreTrainedModel""",
      ]

if TYPE_CHECKING:
      from .configuration_unispeech import UNISPEECH_PRETRAINED_CONFIG_ARCHIVE_MAP, UniSpeechConfig

      try:
            if not is_torch_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .modeling_unispeech import (
                UNISPEECH_PRETRAINED_MODEL_ARCHIVE_LIST,
                UniSpeechForCTC,
                UniSpeechForPreTraining,
                UniSpeechForSequenceClassification,
                UniSpeechModel,
                UniSpeechPreTrainedModel,
            )

else:
      import sys

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









from itertools import permutations



def        __lowercase       (				_SCREAMING_SNAKE_CASE     )			->       bool:


      '''simple docstring'''


      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

      SCREAMING_SNAKE_CASE		=						[7, 11, 13, 17]
      for i, test in enumerate(_SCREAMING_SNAKE_CASE     ):
            if (num[i + 4] * 1_00 + num[i + 5] * 10 + num[i + 6]) % test != 0:
                  return False
      return True



def        __lowercase       (				_SCREAMING_SNAKE_CASE = 10     )			->       int:


      '''simple docstring'''


      return sum(
          int("""""".join(map(_SCREAMING_SNAKE_CASE			,						_SCREAMING_SNAKE_CASE     )     )     )
          for num in permutations(range(_SCREAMING_SNAKE_CASE     )     )
          if is_substring_divisible(_SCREAMING_SNAKE_CASE     )     )


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


