kelvind13 wrote:
AKG1593 wrote:
If n is an odd natural number and n! ends with 32 zeros, then how many values of n are possible?
A. 2
B. 3
C. 1
D. 4
E. none
I think the answer should be B(135,137,139).But the OA is A.Can anyone explain?
I got the right answer but it took me close to 4 minutes to get to it.
by trial and error i plugged in first 100 and realized i was too low, then went to 125 and realized i was still too low, Finally went to 131 and hit jackpot.
I got the answer by using the below formula
(n/5) +(n/5^2) + (n/5^3) = 32
the final numbers are 131 and 133 (since they are odd Numbers only)
Is there a faster solution to this?
I tried using the following way
[n/5] + [n/25] + [n/125] = 32
Now the max value of number when only 5 is contributing for zeroes will be = 5*32 = 160
However, In actuality, even 25 and 125 will contribute towards trailing zeroes.
Now [160/25] = 6 and [160/125] = 1
Therefore to accomodate these contributions you have to adjust our earlier calculation of just considering 5 which gave number 160.
Therefore our answer might be close to 160 - (6+1)*5 = 125
Hence you need to check around this number to get the required number of trailing zeroes.
Hope it helps
Posted from my mobile device