Skip to content

Instantly share code, notes, and snippets.

@IlianIliev
Created June 25, 2012 12:51
Show Gist options
  • Save IlianIliev/2988404 to your computer and use it in GitHub Desktop.
Save IlianIliev/2988404 to your computer and use it in GitHub Desktop.
Project Euler #4
max = 999
min = 100
check = lambda x: True if str(x) == str(x)[::-1] else False
def tmp(max, min):
for x in xrange(max*max, min*min, -1):
if check(x):
for i in xrange(max, min, -1):
if x%i==0 and min < x/i < max :
print x, i, x/i, x/i > min
return
tmp(max, min)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment