Войти
или
Зарегистрироваться
Курсы
Учебник
Учебник 2.0
ОГЭ/ЕГЭ
Олимпиады
Рубрикатор
Компилятор
Статья Автор:
Крюкова Полина
этомоямашинаэтомое
№ 1 with open(input()) as f: n = int(f.readline()) mas = [] for _ in range(n): mas.append(int(f.readline())) k = 0 for i in range(n): x = mas[i] for j in range(i + 1, n): y = mas[j] xy = x * y xy6 = xy % (10 ** 6) xy7 = xy % (10 ** 7) if xy6 == 0 and xy7 != 0: k += 1 print(k) №2 with open(input()) as f: n = int(f.readline()) mas = [] for _ in range(n): mas.append(int(f.readline())) k = 0 for i in range(n): x = mas[i] for j in range(i + 1, n): y = mas[j] sumxy = x + y sum11 = sumxy % 11 xy = x * y xy2310 = xy % 2310 if sum11 == 0 and xy2310 == 0: k += 1 print(k)
×
№1
with open(input()) as f:
n = int(f.readline())
mas = []
for _ in range(n):
mas.append(int(f.readline()))
k = 0
for i in range(n):
x = mas[i]
for j in range(i + 1, n):
y = mas[j]
xy = x * y
xy6 = xy % (10 ** 6)
xy7 = xy % (10 ** 7)
if xy6 == 0 and xy7 != 0:
k += 1
print(k)
от Крюкова Полина 11.10.2024 11:10
№2
with open(input()) as f:
n = int(f.readline())
mas = []
for _ in range(n):
mas.append(int(f.readline()))
k = 0
for i in range(n):
x = mas[i]
for j in range(i + 1, n):
y = mas[j]
sumxy = x + y
sum11 = sumxy % 11
xy = x * y
xy2310 = xy % 2310
if sum11 == 0 and xy2310 == 0:
k += 1
print(k)
от Крюкова Полина 11.10.2024 11:12
Чтобы оставить комментарий нужна авторизация
Печать