Войти
или
Зарегистрироваться
Курсы
Учебник
Учебник 2.0
ОГЭ/ЕГЭ
Олимпиады
Рубрикатор
Компилятор
Статья Автор:
Денисов Михаил
11.2
#1 def check(n, m): x = n * m am = 0 while x % 10 == 0: x //= 10 am += 1 return True if am == 6 else False with open("1.txt", "r") as file: file_data = file.read().splitlines() n = int(file_data[0]) m = [] am = 0 for i in range(n): m.append(int(file_data[i + 1])) for i in range(n - 10): for j in range(i + 1, n): if check(n, m): am += 1 print(am)
×
#2 def check(n, m): return True if (n + m) % 11 == 0 and n * m % 2310 == 0 else False with open("1.txt", "r") as file: file_data = file.read().splitlines() n = int(file_data[0]) m = [] am = 0 for i in range(n): m.append(int(file_data[i + 1])) for i in range(n - 10): for j in range(i + 1, n): if check(n, m): am += 1 print(am)
×
#6 def check(n, m, k): return True if (n + m + k) % 7717 == 0 else False with open("1.txt", "r") as file: file_data = file.read().splitlines() n = int(file_data[0]) m = [] am = 0 for i in range(n): m.append(int(file_data[i + 1])) for i in range(n - 34): for j in range(i + 17, n - 17): for k in range(j + 17, n): if check(m[i], m[j], m[k]): am += 1 print(am)
×
#6 def check(n, m): return True if (n + m) % 4 == 0 and n * m % 9009 == 0 else False with open("1.txt", "r") as file: file_data = file.read().splitlines() n = int(file_data[0]) m = [] am = 0 for i in range(n): m.append(int(file_data[i + 1])) for i in range(n - 25): for j in range(i + 25, n - 25): if check(m[i], m[j]): am += 1 print(am)
×
Чтобы оставить комментарий нужна авторизация
Печать