mirror of
https://github.com/Alexander-D-Karpov/scripts.git
synced 2024-11-15 01:16:36 +03:00
16 lines
291 B
Python
16 lines
291 B
Python
|
with open("17.txt") as f:
|
||
|
data = list(map(int, f.read().splitlines()))
|
||
|
|
||
|
|
||
|
n = min(data)
|
||
|
res = []
|
||
|
|
||
|
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))
|