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
An unexpected error occurred. Please try reloading the page. If problem persists, please contact support@hackerrank.com
Project Euler #20: Factorial digit sum
You are viewing a single comment's thread. Return to all comments →
Almost a one-liner: