Few more problems

This commit is contained in:
MitchellHansen
2017-04-23 22:19:11 -07:00
parent 13a163e81d
commit b3831fb360
6 changed files with 172 additions and 7 deletions

15
problem_30.py Normal file
View File

@@ -0,0 +1,15 @@
total_sum = 0
# just gonna take a wild guess and say there aren't any more higher than 1 million
for i in range(2, 1000000):
num_str = str(i)
sum = 0
for ch in num_str:
sum += pow(int(ch), 5)
if sum == i:
print(i)
total_sum += i
print("Total sum {0}".format(total_sum))