





from itertools import permutations





def 				__lowerCAmelCase(       _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

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





def 				__lowerCAmelCase(       _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() = }")












from collections import defaultdict
from math import ceil, sqrt





def 				__lowerCAmelCase(       _SCREAMING_SNAKE_CASE = 1_000_000							,     _SCREAMING_SNAKE_CASE = 10				)							-> int:




    """simple docstring"""




    _A     =							defaultdict(_SCREAMING_SNAKE_CASE				)

    for outer_width in range(3							,     (t_limit // 4) + 2				):
        if outer_width * outer_width > t_limit:
            _A     =							max(
                ceil(sqrt(outer_width * outer_width - t_limit				)				)							,     1				)
        else:
            _A     =							1

        hole_width_lower_bound += (outer_width - hole_width_lower_bound) % 2

        for hole_width in range(_SCREAMING_SNAKE_CASE							,     outer_width - 1							,     2				):
            count[outer_width * outer_width - hole_width * hole_width] += 1

    return sum(1 for n in count.values() if 1 <= n <= 10				)


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





