Farz0l1x

Untitled

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