You are viewing a single comment's thread. Return to all comments →
Python 3
import sys t = int(input().strip()) for a0 in range(t): n = int(input().strip()) count =0 for i in range(n-1,10000,-1): if str(i)==str(i)[::-1]: for j in range(100,1000): if i%j==0 and i/j <=999: count +=1 print(i) break; if count ==1: break;
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #4: Largest palindrome product
You are viewing a single comment's thread. Return to all comments →
Python 3