In n! , we have factors that are multiples of 3,9,27,81,243,….. If we divide them by 3(9,18,27,36,45,...)we get (3,6,9,12,15..), still multiples of 3. This means that we still have power of 3’s that needs an even pair, so we need to divide again by 3.
Now, since we have already counted the 3’s in the first division, we need to count the second set of 3’s. Instead of dividing again by 3, we divide them by 9 and next by 27 and so on. That is the reason why we also divide n by powers of 3.
Count of 3s in n! = floor(n/3) + floor(n/9) + floor(n/27) + floor(n/81) +….
= $\left \lfloor \frac{100}{3} \right \rfloor$ +$\left \lfloor \frac{100}{9} \right \rfloor$ + $\left \lfloor \frac{100}{27} \right \rfloor$ + $\left \lfloor \frac{100}{81} \right \rfloor$ + $\left \lfloor \frac{100}{243} \right \rfloor$
= 33 + 11 + 3 + 1 + 0
= 48
answer is option D