You are viewing a single comment's thread. Return to all comments →
#!/bin/python3 import sys t = int(input().strip()) for a0 in range(t): n = int(input().strip()) BP = 0 while BP==0: n -=1 if str(n)==str(n)[::-1]: for j in range(100, 999): r = n/j if r % 1 == 0 and r < 1000: BP=n break print(BP)
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 →