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