10000!

Count the number of 0 digits without stop in 10000 ! 10000!


The answer is 2499.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Caleb Townsend
Apr 8, 2015

Each pair of a 5 5 and 2 2 that gets factored in is equivalent to factoring a 10 , 10, or adding a trailing zero. But there are always more than enough 2 2 s, so the number of 5 5 s is all we need to consider. So divide 10000 10000 by 5. 5. It is still not enough, because that doesn't count cases like 25 , 25, 50 , 50, and 125 125 as many times as their power of 5. 5. The formula is Z T ( n ! ) = k = 1 log 5 n n 5 k Z_T(n!) = \sum_{k=1}^{\lfloor \log_5 n\rfloor} \lfloor\frac{n}{5^k}\rfloor In this case n = 10000 n=10000 so the sum is 2499 . \boxed{2499}. This formula only counts trailing zeros.

Nice answer. I didn't thought of using logarithms or sums

Abyoso Hapsoro - 6 years, 2 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...