Advertisement
quartata

Untitled

Oct 28th, 2015
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. from itertools import *
  2. for i in permutations(range(1,50),6):
  3. s=sum(i)
  4. p=reduce(int.__mul__,i)
  5. c=0
  6. for x in permutations(range(1,50),6):
  7. if sum(x)==s: c+=1
  8. if p/s==c and s*c>2*10^6:print i
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement