Advertisement
maxim_shlyahtin

17

Feb 1st, 2022
906
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.34 KB | None | 0 0
  1. with open('80092106-ae10-4513-b8c5-16d531dd69cf (1).txt', 'r') as file:
  2.     a = [int(c) for c in file.readlines()]
  3.  
  4. count: int = 0
  5. maximum: int = 0
  6. for i in range(1, len(a)):
  7.     if (a[i - 1] % 3 == 0 or a[i] % 3 == 0) and (a[i - 1] + a[i]) % 5 == 0:
  8.         count += 1
  9.         maximum = max((a[i - 1] + a[i]), maximum)
  10.  
  11. print(count, maximum)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement