nq1s788

17 пары соседних

Feb 14th, 2026
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.25 KB | None | 0 0
  1. data = open('17 (4).txt').readlines()
  2. a = list(map(int, data))
  3. cnt = 0
  4. mx = -1
  5. for i in range(len(a) - 1):
  6.     if (a[i] * a[i + 1]) % 15 == 0 and (a[i] + a[i + 1]) % 7 == 0:
  7.         cnt += 1
  8.         mx = max(mx, a[i] + a[i + 1])
  9. print(cnt, mx)
Advertisement
Add Comment
Please, Sign In to add comment