As pointed out by @squal “the number of zeroes increase by 2 for every 5 turns”,Solving this problem may come in handy if we follow very interesting property of a prime number and factorials.
Since N! = 1X2X3X…X(n-1)X(n)
so the zeroes come at the end when we encounter pair of 2 and 5.Let us say there are T number of twos in factorising N! and F number of fives. ans we can be pretty sure that T>F as there will obviously be greater number of twos. Hence we need to fing the Power of 5 we get in factorising N!.
As I mentioned earlier there is a very interesting property that for any N! the highest power of a prime number ‘p’ that divides N! can be given by
HIGHEST POWER= N/p + N/(p^2) + N/(p^3).....+N/(p^k)
for k such that p^(k+1)>N
so here we need to find the highest power of 5 that divide the given factorial. for instance 100 and here k=2 as 5^(2+1)=125>100
so Highest power=100/5+100/25 = 20 + 4 =24
since the highest power is number of zeroes so 24 is number of trailing zeroes in 100!.