Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- n = int(input())
- left_sum = 0
- right_sum = 0
- for i in range(n):
- current_num = int(input())
- left_sum += current_num
- for i in range(n):
- current_num = int(input())
- right_sum += current_num
- if left_sum == right_sum:
- print(f'Yes, sum = {left_sum}')
- else:
- diff = abs(left_sum - right_sum)
- print(f'No, diff = {diff}')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement