SHARE
TWEET

Untitled

a guest Apr 26th, 2019 76 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import random
  2.  
  3. a = [random.randint(1, 10) for x in range(100)]
  4. used = []
  5.  
  6. for i in range(100):
  7.     if i in used:
  8.         continue
  9.     for j in range(i+1, 100):
  10.         if j in used or i in used:
  11.             continue
  12.         for k in range(j+1, 100):
  13.             if k in used or j in used or i in used:
  14.                 continue
  15.             temp = a[i] + a[j] + a[k]
  16.             if 10 <= temp <= 27:
  17.                 used.extend([i, j, k])
  18.                 print("{}+{}+{}={}".format(a[i], a[j], a[k], temp))
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