Пример #1
0
def main():
    palindromes = []
    for i in range(999, 99, -1):
        for j in range(i, 99, -1):
            prod = i * j
            if is_palindrome(prod):
                palindromes.append(prod)

    return max(palindromes)
Пример #2
0
Файл: 004.py Проект: qhool/pe
from funcs import is_palindrome

max_pal = 0
for i in range(100,1000):
    for j in range(100,1000):
        p = i*j
        if is_palindrome(p) and p > max_pal:
            max_pal = p

print max_pal