@Korkin/

euler4

Python

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
palindromes = []
for x in range(100, 1000):
    for y in range(x, 1000):
        poss = x*y
        if str(poss)[::-1] == str(poss):
            palindromes.append(poss)
n = 1000000
largest = -1
for p in palindromes:
  if p>largest and p<n:
    largest = p
print(largest)