

'''simple docstring'''



from itertools import permutations
def 						__lowerCamelCase       (   __snake_case     :		Tuple       )       ->							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

						A__     :   Union[str, Any]      =[7, 11, 13, 17]
						for i, test in enumerate(lowercase__       ):
												if (num[i + 4] * 100 + num[i + 5] * 10 + num[i + 6]) % test != 0:
																		return False
						return True
def 						__lowerCamelCase       (   __snake_case     :		List[Any] = 10       )       ->							int:






						"""simple docstring"""





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


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





from math import isqrt







def        _lowerCamelCase(	lowercase__	)						->	bool:

		'''simple docstring'''







		return all(number % divisor != 0 for divisor in range(2   , isqrt(lowercase__	) + 1	)	)







def        _lowerCamelCase(	lowercase__ = 1_0**6	)						->	int:

		'''simple docstring'''







		__lowercase=			0
		__lowercase=			1
		__lowercase=			7
		while prime_candidate < max_prime:
				primes_count += is_prime(lowercase__	)

				cube_index += 1
				prime_candidate += 6 * cube_index

		return primes_count


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






