Exemplo n.º 1
0
def main(verbose=False):
    products = apply_to_list(mul, range(100,1000))
    max_elt = 0
    for elt in products:
        max_elt = elt
        #if is_palindrome(elt) and elt > max_elt:
        #    max_elt = elt
    return max_elt
Exemplo n.º 2
0
def main(verbose=False):
    products = apply_to_list(operator.mul, range(100, 1000))
    return max(elt for elt in products if is_palindrome(elt))
Exemplo n.º 3
0
def main(verbose=False):
    n = 100
    powers = apply_to_list(operator.pow, range(2, n + 1))
    return len(set(powers))
Exemplo n.º 4
0
def main(verbose=False):
    return max(digit_sum(val)
               for val in apply_to_list(operator.pow, range(1, 100)))