aboutsummaryrefslogtreecommitdiff
path: root/python/20-factorial_digit_sum.py
blob: a76b4ae8e5ca560017e33aaf829b74db7a5b2edc (plain)
1
2
3
4
5
6
7
8
9
import math

one_hundred_factorial = math.factorial(100)

to_list_of_int = [int(dgt) for dgt in list(str(one_hundred_factorial))]

sum_of_all_digits = sum(to_list_of_int)

print(sum_of_all_digits)