

"""simple docstring"""




from itertools import permutations



def 	UpperCAmelCase__   (				A__   )      ->      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

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



def 	UpperCAmelCase__   (				A__ = 10   )      ->      int:




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


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







"""simple docstring"""




# flake8: noqa
# Lint as: python3
SCREAMING_SNAKE_CASE_     :			Dict	  =			[
    '''VerificationMode''',
    '''Version''',
    '''disable_progress_bar''',
    '''enable_progress_bar''',
    '''is_progress_bar_enabled''',
    '''experimental''',
]

from .info_utils import VerificationMode
from .logging import disable_progress_bar, enable_progress_bar, is_progress_bar_enabled
from .version import Version
from .experimental import experimental




