SHARE
TWEET

Untitled

a guest Dec 16th, 2018 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. lst = []
  2. pairs = []
  3.  
  4. num = int(raw_input('How many numbers: '))
  5. for n in range(num):
  6.   numbers = int(raw_input('Enter number: '))
  7.   lst.append(numbers)
  8.  
  9. target = sum(lst)
  10.  
  11. for index_i, i in enumerate(lst):
  12.   for index_j, j in enumerate(lst):
  13.     if index_j > index_i:
  14.       if (i * j) > target:
  15.         pair = '(' + str(i) + ',' + str(j) + ')'
  16.         pairs.append(pair)
  17.  
  18. print pairs
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
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top