Trailing Zeroes in Factorial of a Number – FCTRL – SPOJ

Now we can approach it in 2 ways – the first approach is to calculate factorial of a number and then calculate the number of trailing zeros from the result. But for any value greater than 12 we will see integer exceed. So let’s go with the second approach and Find a relation between number and…

Read more...
Bitnami