# Number of $0$ in great number

For example, $11111111111111100$ ends with $2$ zeros ,when we did know the decimal representation like $100!$ also.

I would like a justified answer for the following question . How many $0$ are in the end of decimal representation of $100!$? Is there a general process to know this number for greater number like $2^{100!}\times5^{39!}$?

-
$2^{100!}$ does not end in zero because it is not divisible by $5$. –  Hagen von Eitzen Apr 2 '14 at 11:03
yes i just make a typo –  masmoudihoussem Apr 2 '14 at 11:10
$2^{100!}*5^{39!}$ isn't very different, there are less 5 than 2 in its factorization so it ends with $5^{39!}$ zeros –  Alessandro Apr 2 '14 at 11:53

It is fairly easy with factorials, a number ends with as many $0$s as the number of $5*2$ in his factorization. It is obvious that there are more 2 than 5 in the factorization of any factorial so we only need to count how many $5$s are there in the factorization of $100!$. These are $\frac{100}{5}+\frac{100}{5^2}=24$ since $5^3>100$

-

A very useful result to know, which also helps here, is Legendre's Theorem :

The number $n!$ contains the prime factor $p$ exactly $$\sum_{k\geq 1} \lfloor n/p^k \rfloor$$

-

Of the 100 numbers multiplying to give 100! ten of them end in 0 (10, 20, ...100) giving 11 zeros. The only other way to get a 0 is to mutliply an even number by a number ending in 5. There are ten numbers ending in 5 (5, 15,...,95) and multiplying by any ten even numbers (except the multiples of 10) will give 10 more zeros. So that is 21 zeros on the end of 100!

-
This is not correct. See Alessandro's answer. –  Peter Phipps Apr 2 '14 at 11:18
Yes, 50, 25 and 75 contribute two 5's which can be multiplied by even numbers to contribute 3 more zeros. –  Paul Apr 2 '14 at 11:32
Also, $100!$ is "small" enough to calculate it and then simply count how many $0$s are there at the end of $9332621544394415268169923885626670049071596826438162146859296389521759999322991‌​5608941463976156518286253697920827223758251185210916864000000000000000000000000$ –  Alessandro Apr 2 '14 at 11:39