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