Created
October 17, 2014 00:31
-
-
Save Achifaifa/3a6b31c0aad7a7429115 to your computer and use it in GitHub Desktop.
Python program to solve a stupid math riddle. The set thing worked out nicely, and it was a good excuse to use list generators ;)
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
number=1234567890 | |
while 1: | |
if number%12==number%11==number%10==number%9==number%8==number%7==0 and set(list(str(number)))==set([str(a) for a in range(10)]):break | |
else: number+=10 | |
print number |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment