SHARE
TWEET

Untitled

a guest May 19th, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. n = int(input())
  2. left_sum = 0
  3. right_sum = 0
  4.  
  5. for num in range(2 * n):
  6.     current_num = int(input())
  7.     if num < n:
  8.         left_sum += current_num
  9.     else:
  10.         right_sum += current_num
  11.  
  12. if left_sum == right_sum:
  13.     print(f'Yes, sum = {left_sum}')
  14. else:
  15.     diff = abs(left_sum - right_sum)
  16.     print(f'No, diff = {diff}')
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top