# Find the number of consecutive zeros at the end of the following numbers $100!+200!$

To find the tailing zeros of $100!+200!$, I first found $100!$ To be $24$ zeros and $200!$ To be $49$. When we add, the result should be $73$ but the answer is given as $24$ which I cannot understand. Help me out, thanks.

• Do not confuse $(100!)\times (200!)$ with $(100!)+(200!)$. As an example, consider $100+100000000=100000100$ which only ends with $2$ zeroes. Commented Jul 11, 2018 at 4:01
• Just use $100!+200!=100!(1+\frac{200!}{100!})=100!(1+200\cdot 199 \cdots 101)$, and the expression in brackets is clearly not divisible by $10$, so ...
– Sil
Commented Jul 13, 2018 at 2:51

The number of trailing zeros in the decimal representation of $n!$, the factorial of a non-negative integer $n$, can be determined by the formula $$\frac n5+\frac{n}{5^2}+\frac{n}{5^3}+....+\frac{n}{5^k},\mbox{ where k must be chosen such that }5^{k+1}>n$$

Note that the number of tailing zeros in $100!+200!$ is equal to the number of tailing zero's in the smallest factorial. That is because the number of tailing zeros is different in both summands, making sure that the first non-zero digit in $100!$ meets with a zero digit from $200!$ to create the first non-zero digit in the sum. Here the smallest factorial is $100!$ which you already found the tailing zero's to be $24$.

So, the number of tailing zero's in $100!+200!$ is $24$

• I know about the formula and it is not working. If we use that formula then the total zeros should be 73 but it is given as 24. Commented Jul 11, 2018 at 4:07
• There are no tailing zeros under 4! Commented Jul 11, 2018 at 4:10
• @anurag Right, and neither in $3!$, so by that argument there should be no trailing zeros in the sum, but it so happens that there is one. That was precisely my point.
– dxiv
Commented Jul 11, 2018 at 4:10
• @dxiv easily fixed. Let $A$ and $B$ be integers which have $a$ and $b$ tailing zeroes respectively. In the event that $a=b$ then $A+B$ has at least as many tailing zeroes as $a$ but it could be more (consider $A=1,B=10^n-1$). However, if $a<b$ then $A+B$ has exactly $a$ tailing zeroes. Commented Jul 11, 2018 at 4:15
• @JMoravitz Indeed, but it's still not fixed in the posted - and edited, and accepted since - answer ;-)
– dxiv
Commented Jul 11, 2018 at 4:18