Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- data = open('17 (4).txt').readlines()
- a = list(map(int, data))
- cnt = 0
- mx = -1
- for i in range(len(a) - 1):
- if (a[i] * a[i + 1]) % 15 == 0 and (a[i] + a[i + 1]) % 7 == 0:
- cnt += 1
- mx = max(mx, a[i] + a[i + 1])
- print(cnt, mx)
Advertisement
Add Comment
Please, Sign In to add comment