Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def facsum(n):
- tempval, total = 1, 0
- temp = str(n)
- for a in temp:
- for b in range(1, int(a)+1):
- tempval *= b
- total += tempval
- tempval = 1
- return total
- answer = 0
- for a in range(1, 10**6):
- print(a)
- chain, val = [], a
- for b in range(61):
- chain.append(a)
- a = facsum(a)
- if len(set(chain)) == 60:
- answer += 1
- print(answer)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement