Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- n = int(input())
- sum_first = 0
- sum_second = 0
- # първите n числа и ги сумираме
- for number in range(1, n + 1):
- value = int(input())
- sum_first += value
- # вторите n числа и ги сумираме
- for number in range(1, n + 1):
- value = int(input())
- sum_second += value
- if sum_first == sum_second:
- print(f'Yes, sum = {sum_first}')
- else:
- print(f'No, diff = {abs(sum_first - sum_second)}')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement