Skip to content

Instantly share code, notes, and snippets.

@Achifaifa
Created October 17, 2014 00:31
Show Gist options
  • Save Achifaifa/3a6b31c0aad7a7429115 to your computer and use it in GitHub Desktop.
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 ;)
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