Skip to content
Snippets Groups Projects
Commit d8321647 authored by Taddeus Kroes's avatar Taddeus Kroes
Browse files

Solved 34

parent 8668f019
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env python
from itertools import combinations
from math import factorial
def digits(n):
return map(int, str(n))
def facsum(n):
return sum(facs[d] for d in digits(n))
facs = map(factorial, range(10))
s = 0
for n in xrange(10, 99999):
if n == facsum(n):
s += n
print s
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment