Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 061e659cfb
Fetching contributors…

Cannot retrieve contributors at this time

17 lines (14 sloc) 0.384 kb
def is_palindrome(num):
return str(num) == str(num)[::-1]
x = 999
y = 990 # largest 3-digit multiple of 11
maximum = 0
while x >= 100:
while y >= 100:
product = x*y
if is_palindrome(product) and product > maximum:
maximum = product
y -= 11 # decrement by 11 instead of 1
y = 990
x -= 1
print maximum # prints 906609
Jump to Line
Something went wrong with that request. Please try again.