|
![](/i/fill.gif) |
Warp <war### [at] tag povray org> wrote:
> 4) By their nature, factorials tend to accumulate trailing zeroes. For
> example, 5! (120) has one trailing zero, 10! (3628800) has two trailing
> zeroes, 25! (15511210043330985984000000) has six trailing zeroes, etc.
>
> Give a (non-recursive) mathematical function which, for an integer n,
> gives the number of trailing zeroes in n!.
That's closely related to this exceedingly difficult problem, at least for those
of us not familiar with number theory.
http://projecteuler.net/index.php?section=problems&id=160
I spent a lot of time on this, but was never able to get the right answer. You
basically need a closed-form solution since you can't even iterate a simple
model that far in a reasonable amount of time.
- Ricky
Post a reply to this message
|
![](/i/fill.gif) |