How many zeros

Find the number of trailing zeros are in the number 125 ! 125! .

30 28 29 31

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.

2 solutions

John Lesteя Tan
Aug 14, 2015
  • GIF (125/5) + GIF (125/25) + GIF (125/125)
  • GIF = greatest integer function

We have to look at the power of 5 in 125! There are 25 multiples of 5 starting from 1 to 125. They will contribute 25 powers of 5. But 25 being 5^2, every multiple of it will add extra 5. So for 25, 50, 75, 100 we get 4 more 5's. And 125 is 5^3. It gives 2 more 5's. So total 25+4+2 = 31

Please mention about the ceiling function. Thank you for solution.

Swapnil Das - 5 years, 10 months ago

Log in to reply

Ceiling is not used here i think. Didn't get you.

Shib Shankar Sikder - 5 years, 10 months ago

Log in to reply

You were lucky enough that you got a number like 125 which has 5 as its sole factor, except one and powers of the former. Please give a look at the wiki of calculation of trailing zeros of a factorial for further guidance. Thanks.

Swapnil Das - 5 years, 10 months ago

Log in to reply

@Swapnil Das Yaa every new power of 5 will start a new series that will contribute more 5's we used those properties in another problem, which asked smallest number whose factorial will have 2015 trailing zeros.

Shib Shankar Sikder - 5 years, 10 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...