scripts/ege/25013092/17.py

16 lines
286 B
Python
Raw Normal View History

2023-05-05 00:45:01 +03:00
with open("17.txt") as f:
data = list(map(int, f.read().split()))
res = []
n = min(data)
for i in range(1, len(data)):
num1 = data[i - 1]
num2 = data[i]
if num1 % 117 == n or num2 % 117 == n:
res.append(num1 + num2)
print(len(res), max(res))