Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #https://inf-ege.sdamgia.ru/problem?id=37336
- data = open('17.txt').readlines()
- cnt = 0
- mx = -10000000
- for i in range(len(data) - 1):
- a = int(data[i])
- b = int(data[i + 1])
- if (a % 3 == 0) or (b % 3 == 0):
- cnt += 1
- mx = max(mx, a + b)
- print(cnt, mx)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement