Untitled

mail@pastecode.io avatar
unknown
plain_text
22 days ago
410 B
2
Indexable
Never
numbers_count = int(input())
left_sum = 0
right_sum = 0
for num in range(numbers_count):
    number_added = int(input())
    left_sum += number_added
for num in range(numbers_count):
    number_added = int(input())
    right_sum += number_added
sum_difference = abs(left_sum - right_sum)
if left_sum == right_sum:
    print(f"Yes, sum = {left_sum}")
else:
    print(f"No, diff = {sum_difference}")
Leave a Comment