



from itertools import permutations


def A						(       __UpperCamelCase					)						->      bool:
			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(__UpperCamelCase					):
						if (num[i + 4] * 100 + num[i + 5] * 10 + num[i + 6]) % test != 0:
									return False
			return True


def A						(       __UpperCamelCase = 10					)						->      int:
			return sum(
			    int(''.join(map(__UpperCamelCase ,	__UpperCamelCase					)					)					)
			    for num in permutations(range(__UpperCamelCase					)					)
			    if is_substring_divisible(__UpperCamelCase					)					)


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











import webbrowser
from sys import argv
from urllib.parse import parse_qs, quote

import requests
from bsa import BeautifulSoup
from fake_useragent import UserAgent

if __name__ == "__main__":
							SCREAMING_SNAKE_CASE__       =      '''%20'''.join(argv[1:]) if len(argv) > 1 else quote(str(input('''Search: ''')))

							print('''Googling.....''')

							SCREAMING_SNAKE_CASE__       =      f'https://www.google.com/search?q={query}&num=100'

							SCREAMING_SNAKE_CASE__       =      requests.get(
							    url,
							    headers={'''User-Agent''': str(UserAgent().random)},
							)

							try:
														SCREAMING_SNAKE_CASE__       =      (
														    BeautifulSoup(res.text, '''html.parser''')
														    .find('''div''', attrs={'''class''': '''yuRUbf'''})
														    .find('''a''')
														    .get('''href''')
														)

							except AttributeError:
														SCREAMING_SNAKE_CASE__       =      parse_qs(
														    BeautifulSoup(res.text, '''html.parser''')
														    .find('''div''', attrs={'''class''': '''kCrYT'''})
														    .find('''a''')
														    .get('''href''')
														)['''url'''][0]

							webbrowser.open(link)




