Exemplo n.º 1
0
def solve():
    largest = 0
    for i in range(999,100,-1):
        for j in range(i,100,-1):
            if(is_palindrome(i*j) and i*j > largest):
                largest = i*j
    return largest
Exemplo n.º 2
0
def is_lychrel(n):
    for _ in range(50):
        n += reverse_digits(n)
        if is_palindrome(n):
            return False
    return True
Exemplo n.º 3
0
def solve():    
    total = 0
    for x in range(1,1000000):
        if is_palindrome(x) and is_palindrome(str(bin(x))[2:]):
            total += x
    return total