Suppose we want to find highest power of a number(n) in n factorial m
It is calculated by
=[m/n]+[m/n*n]+[m/n*n*n]....
where [] is greatest integer
Example if we want to find highest power of 5 in 30 factorial
It will be [30/5]+[30/25]
=6+1
So highest power of 5 in 30 factorial is 7