Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- n = int(input())
- number1 = int(input())
- number2 = int(input())
- sum1 = number1 + number2
- max_diff = 0
- for i in range(n - 1):
- number1 = int(input())
- number2 = int(input())
- sum2 = number1 + number2
- diff = abs(sum2 - sum1)
- if diff > max_diff:
- max_diff = diff
- sum1 = sum2
- if max_diff == 0:
- print(f'Yes, value={sum1}')
- else:
- print(f'No, maxdiff={max_diff}')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement