Last active
August 29, 2015 14:07
-
-
Save TheBB/ce7374b94fe1f3f4801f to your computer and use it in GitHub Desktop.
This file contains 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
total = 1904 | |
wc = 3 | |
xc = 25 | |
yc = 38 | |
zc = 175 | |
# roots = [] | |
for w in xrange(0, total/wc + 1): | |
for x in xrange(0, (total - wc*w)/xc + 1): | |
for y in xrange(0, (total - wc*w - xc*x)/yc + 1): | |
for z in xrange(0, (total - wc*w - xc*x - yc*y)/zc + 1): | |
if w*wc + x*xc + y*yc + z*zc == total: | |
# roots.append((w,x,y,z)) | |
print 'w={w: <3} x={x: <3} y={y: <3} z={z: <3}'.format(w=w, x=x, y=y, z=z) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment