

"""simple docstring"""






from itertools import permutations



def   lowercase_	(    _lowercase       :		tuple	):




					'''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

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



def   lowercase_	(    _lowercase       :		int = 10	):




					'''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() = }''')





"""simple docstring"""






import math



def   lowercase_	(    _lowercase       :		int	):




					'''simple docstring'''






					return math.sqrt(_lowercase	) * math.sqrt(_lowercase	) == num



def   lowercase_	(    _lowercase       :		int	):




					'''simple docstring'''






					UpperCAmelCase			:   List[Any]      =				0
					UpperCAmelCase			:   Tuple      =				n
					while left <= right:
										UpperCAmelCase			:   Tuple      =				(left + right) // 2
										if mid**2 == n:
															return True
										elif mid**2 > n:
															UpperCAmelCase			:   List[str]      =				mid - 1
										else:
															UpperCAmelCase			:   Any      =				mid + 1
					return False


if __name__ == "__main__":
	import doctest

	doctest.testmod()


