Skip to content

Instantly share code, notes, and snippets.

@alcides
Created May 20, 2015 17:56
Show Gist options
  • Save alcides/8e8a219ebaeb7f0fd543 to your computer and use it in GitHub Desktop.
Save alcides/8e8a219ebaeb7f0fd543 to your computer and use it in GitHub Desktop.
def check(arr):
return arr[0] + 13 * arr[1] / float(arr[2]) + arr[3] + 12 * arr[4] - arr[5] - 11 + arr[6] * arr[7] / float(arr[8]) - 10 == 66
import random
arr = range(1,10)
while not check(arr):
random.shuffle(arr)
print arr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment