Advertisement
horozov86

08. Equal Pairs

Dec 6th, 2022
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.32 KB | None | 0 0
  1. pair_of_numbers = int(input())
  2.  
  3. total_sum = 0
  4. current_sum = 0
  5. for i in range(1, pair_of_numbers + 1):
  6.     number_one = int(input())
  7.     number_two = int(input())
  8.  
  9.     current_sum = number_one + number_two
  10.     total_sum += current_sum
  11.  
  12. if total_sum / pair_of_numbers == current_sum:
  13.     print(f"Yes, value={current_sum}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement