Farz0l1x

Untitled

Oct 20th, 2023
676
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.31 KB | None | 0 0
  1. file = open('17_10719.txt')
  2. A = list(map(int, file.readlines()))
  3. count = 0
  4. Max = 0
  5. for i in range(len(A) - 3):
  6.     if (abs(A[i]) % 100 == 13 and abs(A[i + 3]) % 100 != 13) or (abs(A[i]) % 100 != 13 and abs(A[i + 3]) % 100 == 13):
  7.         count += 1
  8.         Max = max(Max, A[i] + A[i + 3])
  9. print(count, Max)
Advertisement
Add Comment
Please, Sign In to add comment