It is given that 2007! = 2007x2006x2005x...x3x2x1. How many trailing zeros are there in 2007! ?
remainder of [2007/5] + remainder of [2007/25] + remainder of [2007/125] + ...
remainder or the floor value????
in general summation of yep .. sorry.
goes up with 5^n ... and 5^n should be less than 2007
Explanation would be appreciated.
i was going to ask this question, but then i found out! in wikipedia.
Wow. I have the solution but I don't understand.
5 ! = 1 zeros 10! = 2 zeros 15! = 3 zeros 20! = 4 zeros 25! = 6 zeros ??? <-- ?? 30! = 7 zeros
6 is correct for 25!
first two types of zero 5*2 = 10 <-- this gives one zero the other zero comes from 10 <--- this gives one zero the other type of zero 25*4 = 100 <--- extra zero at the multiple of 25
because there are two 5's
multiple of 5 give zeros .. just try to extract them.
[2007/5] => no. of 1 zero [2007/25] => no. of double zeros from multiplication [2007/125] => no. of triple zeros from multiplication [2007/625] => no. of four zeros from multiplication ^ right?
yep!!
[2007/25] => no. of zeros from double 5 multiplication [2007/125] => no. of triple zeros from triple 5 multiplication [2007/625] => no. of four zeros from quadruple 5 multiplication
That looks better... Thanks!
one 5 get's stripped by [x/5] ... same goes for higher multiple of 5
Join our real-time social learning platform and learn together with your friends!