Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- with open('80092106-ae10-4513-b8c5-16d531dd69cf (1).txt', 'r') as file:
- a = [int(c) for c in file.readlines()]
- count: int = 0
- maximum: int = 0
- for i in range(1, len(a)):
- if (a[i - 1] % 3 == 0 or a[i] % 3 == 0) and (a[i - 1] + a[i]) % 5 == 0:
- count += 1
- maximum = max((a[i - 1] + a[i]), maximum)
- print(count, maximum)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement