Project Euler: Problem 4

https://projecteuler.net/problem=4

A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99.

Find the largest palindrome made from the product of two 3-digit numbers.


In [119]:


In [144]:
x = list(range(1,998002))
y = []
z = list(range(100,1000))
a = []
for item1 in x:
    if item1 == int(reverse(item1)):
        y.append(int(reverse(item1)))
        
for item2 in y:
    for item3 in z:
        if item2 % item3 == 0:
            a.append(item2)

b = len(a) - 1
c = a[b]

print(c)


995599

In [120]:
# This cell will be used for grading, leave it at the end of the notebook.