Find the number of trailing zeros of the following number:
1 1 × 2 2 × 3 3 × 4 4 × 5 5 × ⋯ × 9 9 9 9 × 1 0 0 1 0 0
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Nice thought of actually bringing this question (+1). :)
Same strategy, but different order. But your way looks more organized!
Same Way! (+1)
Nice solution but this will work only when highest power of 2 is greater than 5.
Log in to reply
@Harsh Shrivastava don't you think power of 2 will always be greater then power of 5.
Log in to reply
It is correct in these types of questions but suppose if you have (5×5×2)×(25×25×4)×(125×125×8)×... then highest power of 5>2.
Log in to reply
@Harsh Shrivastava – @Harsh Shrivastava yeah you are right...but I was talking about consecutive positive integers
Try These Problems 1 , 2 and 3 @Ravneet Singh .
Problem Loading...
Note Loading...
Set Loading...
For counting number of trailing zeroes in any integer, we only need to find the number of 5's in that integer.
So, Number of 5's in 5 5 = 5
Number of 5's in 1 0 1 0 = 10
and so on except for 2 5 2 5 which contains 5 0 5's (as 25 itself contains t w o 5's)
similarly for 5 0 5 0 which contains 1 0 0 5's, 7 5 7 5 contains 1 5 0 5's and 1 0 0 1 0 0 contains 2 0 0 5's
So Total =
5 + 1 0 + 1 5 + 2 0 + 5 0 + 3 0 + 3 5 + 4 0 + 4 5 + 1 0 0 + 5 5 + 6 0 + 6 5 + 7 0 + 1 5 0 + 8 0 + 8 5 + 9 0 + 9 5 + 2 0 0 = 1 3 0 0