Initial commit

This commit is contained in:
Kevin Keogh
2018-07-02 15:45:49 -04:00
parent 60b3954a3b
commit fd817f8811
28 changed files with 809 additions and 0 deletions

18
problem-34.py Normal file
View File

@@ -0,0 +1,18 @@
MAX_NUM = 100000
def fact(n):
result = 1
for i in range(2, n+1):
result *= i
return result
if __name__ == '__main__':
results = []
for i in range(3, MAX_NUM):
digits = list(str(i))
if i == sum([fact(int(j)) for j in digits]):
results.append(i)
print(results)
print(sum(results))