Initial commit
This commit is contained in:
14
problem-30.py
Normal file
14
problem-30.py
Normal file
@@ -0,0 +1,14 @@
|
||||
|
||||
MAX_NUM = 1000000
|
||||
|
||||
results = []
|
||||
|
||||
for i in range(2, MAX_NUM+1):
|
||||
digits = list(str(i))
|
||||
total = sum([int(x)**5 for x in digits])
|
||||
if total == i:
|
||||
results.append(i)
|
||||
|
||||
print(results)
|
||||
print(sum(results))
|
||||
print(len(results))
|
||||
Reference in New Issue
Block a user