0%

Problem 160


Problem 160


Factorial trailing digits

For any N, let f(N) be the last five digits before the trailing zeroes in N!.
For example,

9! = 362880 so f(9)=36288
10! = 3628800 so f(10)=36288
20! = 2432902008176640000 so f(20)=17664

Find f(1,000,000,000,000)


阶乘的尾数

对于任意N,记f(N)为N!除去末尾零后的最后五位数字。
例如,

9! = 362880,所以f(9)=36288
10! = 3628800,所以f(10)=36288
20! = 2432902008176640000,所以f(20)=17664

求f(1,000,000,000,000)