TCS
Company
N! Is having 37 zeroes at its end. How many values of N is/are possible?
a) 0 b) 1 c) 5 d) Infinite
Read Solution (Total 3)
-
- N can have values from 150 to 154
so 5 values of N are possible. - 12 years agoHelpfull: Yes(11) No(5)
- plz explain clearly
- 12 years agoHelpfull: Yes(0) No(2)
Take the number that you've been given the factorial of.
Divide by 5; if you get a decimal, truncate to a whole number.
Divide by 52 = 25; if you get a decimal, truncate to a whole number.
Divide by 53 = 125; if you get a decimal, truncate to a whole number.
Continue with ever-higher powers of 5, until your division results in a number less than 1. Once the division is less than 1, stop.
Sum all the whole numbers you got in your divisions. This is the number of trailing zeroes.
- 11 years agoHelpfull: Yes(0) No(2)
TCS Other Question