Tuesday 11 December 2012

algebra precalculus - Given $n$, find smallest number $m$ such that $m!$ ends with $n$ zeros

I got this question as a programming exercise. I first thought it was rather trivial, and that $m = 5n$ because the number of trailing zeroes are given by the number of factors of 5 in $m!$ (and factors of 2, but there are always a lot more of those).




But it seems like this is not true, because I'm not getting the correct answers for certain $n$. Any hints?

No comments:

Post a Comment

real analysis - How to find $lim_{hrightarrow 0}frac{sin(ha)}{h}$

How to find $\lim_{h\rightarrow 0}\frac{\sin(ha)}{h}$ without lhopital rule? I know when I use lhopital I easy get $$ \lim_{h\rightarrow 0}...