Problems > Factorion > Editorial

Factorion — Solution & Editorial

Back to the Problem

Precompute 0!..9! and sum per digit.

Complexity: O(√N) or better