Created
June 25, 2012 12:51
-
-
Save IlianIliev/2988404 to your computer and use it in GitHub Desktop.
Project Euler #4
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
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