Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- line = input()
- arr = list()
- cnt = 0
- max_sum = 0
- while line:
- arr.append(int(line))
- line = input()
- for i in range(len(arr) - 1):
- a = arr[i]
- b = arr[i + 1]
- if (a % 5 == 0 or b % 5 == 0) and abs(a - b) % 2 > 0:
- cnt += 1
- max_sum = max(max_sum, a + b)
- print(cnt, max_sum) # 957 19523
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement