The best strategy which i have come across is :

The highest power of prime number p in n! = [n/p1] + [n/p2] + [n/p3] + [n/p4] + …

[x] denotes the greatest integer less than or equal to x.

[1.2] =1

[4] = 4For example:

Find the highest power of 3 in 100!= [100/3] + [100/32] + [100/33] + [100/34] + [100/35] + …

= 33 + 11 + 3 + 1 + 0 (from here on greatest integer function evaluates to zero)

= 48.

Now coming back to your first problem:

Number of 5's in 100! =? [100/5] + [100/(5^2)] = 20+4=24

For no: which is non prime like 24,40 etc. use the below mentioned methodology with an example:

We learnt before that any non prime number can be expressed as a product of its prime factors. We will use this concept to solve this type of questions.

What is the greatest power of 30 in 50!30 = 2 * 3 * 5.

Find what the highest power of each prime is in the given factorial

We have 25 + 12 + 6 + 3 + 1 = 47 2s in 50!

16 + 5 + 1 = 22 3s in 50!

10 + 2 = 12 5s in 50!

We need a combination of one 2, one 3 and one 5 to get 30. In the given factorial we have only 12 5s. Hence only twelve 30s are possible. So the greatest power of 30 in 50! is 12.Now let's solve the 3 rd problem which is Number of 14 in 100! =?

14=2*7

We have 50+ 25 + 12 + 6 + 3 + 1 = 97 2s

We have 14+2 = 16 7s

We need a combination of one 2, one 7 to get 14. In the given factorial we have only 16 7s. Hence only sixteen 14s are possible. So the greatest power of 7 in 100! is 16.
_________________

_______________________________________________

If you appreciate the post then please click +1Kudos