Moved solutions till 35 to Python.

This commit is contained in:
2019-07-16 12:51:07 -04:00
parent f76b36c8d3
commit d94fc90600
13 changed files with 262 additions and 66 deletions

13
python/e030.py Normal file
View File

@@ -0,0 +1,13 @@
def euler_030():
fifth_power_lookup = {str(i): i**5 for i in range(0, 10)}
def is_number_sum_of_fiths_powers_of_digits(n):
return n == sum([fifth_power_lookup[d] for d in str(n)])
return sum([i for i in range(2, 1000000)
if is_number_sum_of_fiths_powers_of_digits(i)])
if __name__ == "__main__":
print("e030.py: {}".format(euler_030()))
assert(euler_030() == 443839)