def main(): correct_numbers = [] for i in range(2, 1000000): if i == sum(x**POWER for x in helpers.int_to_digits(i)): correct_numbers.append(i) print(correct_numbers) answer = sum(correct_numbers) print(answer)
def is_curious(n): return n == sum(factorial(x) for x in helpers.int_to_digits(n))
def main(): answer = max( sum(helpers.int_to_digits(a**b)) for a in range(100) for b in range(100)) print(answer)
def main(): answer = sum(helpers.int_to_digits(2**1000)) print(answer)
def main(): factorial = math.factorial(100) answer = sum(helpers.int_to_digits(factorial)) print(answer)