Calculate How Many Zeros Ends In $\displaystyle1239!$

The answer is 306.

**
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.

If a number has $\textit{n}$ terminal $\textit{zeros}$ , then it contains $\textit{n}$ factors of $10$ . But since $10=5\cdot 2$ we are asking how many how many factors of $2$ and $5$ are there.

Since $2$ is smaller than $5$ , for any factor of $5$ there will be enough factors of $2$ to make a factor of $10$ . thus we need to count only factors of $5$

Since $1239 \div 5 = 247.8$

there are $247$ factors of $5$ on $1239$

But the numbers divisible by $25$ will have $2$ factors of $5$ of which $1$ we have counted.

Since, $1239 \div 25 = 49.56$

there are $49$ factors of $5$ again

Similarly, there will be $3$ factors of $125$ in $1239$ of which $2$ we have counted

Since, $1239 \div 125 = 9.912$

there are $9$ factors of $5$ again

similarly there will be $1$ factor again of $5$ taking into consideration $625$ which contain $4$ factors of $5$

Therefore, there are total $247+49+9+1 = 306$ factors of $5$

which implies that there are total $306$ $zeros$ at the end of $1239!$