S
S
snake792017-02-28 15:19:47
Programming
snake79, 2017-02-28 15:19:47

Number of zeros in double factorial?

Hello!
Who knows how to count the number of zeros in the Double Factorial Wikipedia ? There is a cool algorithm for counting the number of zeros in an ordinary factorial without calculating the factorial itself - Super Algorithm . how to use it in solving this problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
longclaps, 2017-02-28
@snake79

The solution is rather trivial:
for odd n -> n!! odd, i.e. no zeros at the end.
for even - in the "super-duper" algorithm, replace 5 with 10 (and powers of ten), since there are no fives (odd factors) there at all.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question