Factorial Problem

The number of zeroes at the end of 100! (100 factorial)

23 22 24 25

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.

1 solution

Using the floor function:

f ( 100 ) = 100 5 + 100 25 + 100 125 + f(100)=\left\lfloor{\frac{100}{5}}\right\rfloor+\left\lfloor{\frac{100}{25}}\right\rfloor+\left\lfloor{\frac{100}{125}}\right\rfloor+\ldots = 20 + 4 + 0 + 0 + = 24 =20+4+0+0+\ldots=\boxed{24}

Why you used the squares of 5?

Pedro Henrique - 5 years, 7 months ago

This answer is unnecessarily difficult. We have a product to which we'll add a zero every time a multiple of 10 is freshly constructed. The prime factors of 10 are 5 and 2, so in general the product of any even number and 5 will yield an extra zero. It doesn't matter if you pick 5x2, 5x4 which is 5x2x2 and so on. There are 50 even numbers (2,4,6...) and 20 multiples of 5 (5,10,15...). It's also possible that a number has a prime factorization that has more than one five, which is the case for 25, 50, 75 and 100. These are the multiples of 5x5 or 25, so they need to be counted double. 20 multiples of 5 and 4 multiples of 25 gives 24. The next power of 5 is 125 which is larger than 100. The floor function is completely irrelevant if you simply state that once (5^m)%100<5^m the fun ends.

A Former Brilliant Member - 3 years, 9 months ago

What's floor function?is there any wiki post about that?

Mr Yovan - 5 years, 9 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...