Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- number_of_lines = int(input())
- left_sum = 0
- right_sum = 0
- for num in range(number_of_lines):
- current_number = int(input())
- left_sum += current_number
- for num in range(number_of_lines):
- current_number = int(input())
- right_sum += current_number
- 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