Created
April 7, 2011 15:45
-
-
Save Spaxe/908037 to your computer and use it in GitHub Desktop.
Pixel.io's crytarithm brute force solution
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
# WWW * GPU = PIXEL I/O | |
# X = 6 | |
# O != 1 | |
from itertools import permutations | |
for digits in permutations(d for d in range(10) if d != 6): | |
W, G, P, U, I, E, L, O = digits[:8] | |
if (O != 1 and O * (W*100+W*10+W) * (G*100+P*10+U) == (P*100000+I*10000+6000+E*100+L*10+I)): | |
print ("{}{}{} * {}{}{} = {}{}6{}{} {}/{}".format(W, W, W, G, P, U, P, I, E, L, I, O)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment