Created
November 17, 2013 00:28
-
-
Save apoz/7507339 to your computer and use it in GitHub Desktop.
Untitled 3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import itertools | |
mylist = list(itertools.permutations('123456789')) | |
for (a,b,c,d,e,f,g,h,i) in mylist: | |
myresul1=float(a+b)/float(c+d+e) | |
myresul2=float(f+g)/float(h+i) | |
if myresul1+myresul2==float(7): | |
print 'Found it ('+a+b+'/'+c+d+e+')+('+f+g+'/'+h+i+')' | |
break | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Y sin levantarme del sofa! jajaja