import math value = math.factorial(100) string = str(value) sum = 0 for i in string: sum += int(i) print(sum)