示例#1
0
def problem56():
    # As a and b increase, the number of digits of a**b increase and thus the
    # sum of digits will also likely increase.
    # For example 90**90 has 176 digits, so a number around it should have a digit sum of around 5*176
    # And it keeps increasing from there.
    return max(applyToDigits(a ** b, lambda x: x) for a, b in permutations(range(90, 100), 2))
示例#2
0
def problem20():
	return applyToDigits(factorial(100))
示例#3
0
def problem16():
	return applyToDigits(2**1000)