You are viewing a single comment's thread. Return to all comments →
Almost a one-liner:
from math import factorial for _ in range(int(input())): print(sum(int(d) for d in str(factorial(int(input())))))
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #20: Factorial digit sum
You are viewing a single comment's thread. Return to all comments →
Almost a one-liner: