# 17.9 РТ
user_8840555
python
2 years ago
269 B
6
Indexable
f = open(r'C:\Users\SnowDrit\Downloads\17.9.txt') a = [] for s in f: a.append(int(s)) me = min(a) sp = [] for i in range(len(a) - 1): if a[i] % 123 == me or a[i + 1] % 123 == me: sp.append(a[i] + a[i + 1]) print(len(sp), max(sp)) # 17.9 РТ
Editor is loading...