Skip to content

Instantly share code, notes, and snippets.

@soimort
Created March 5, 2012 15:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save soimort/1978894 to your computer and use it in GitHub Desktop.
Save soimort/1978894 to your computer and use it in GitHub Desktop.
Project Euler - Problem 4
for n in range(999, 99, -1):
m = int(str(n) + str(n)[::-1])
for i in range(999, 99, -1):
if m % i == 0 and len(str(m // i)) == 3:
print(m)
exit()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment