Again 2007!

Find the number of the trailing zeroes in the product of the first 2007 positive integers.


The answer is 500.

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

Kevin Bourrillion
Apr 25, 2014

Consider all the prime factors making up 2007!. Each zero we want in our result requires one 2 and one 5. We can easily recognize that we'll have more than enough 2s to go around, and focus only on the 5s.

One-fifth of the numbers rounded down, or 401 of them, will be divisible by five and thus contribute at least one five each to the product.

One-fifth of those rounded down, or 80 of them, will be divisible by 25 and thus contribute a second five each.

One-fifth of those -- 16 -- contribute a third and in the same vein, 3 contribute a fourth.

401 + 80 + 16 + 3 = 500. How fun that the answer itself has a few trailing zeroes!

HI kevin...thanks for ur answer...i dig my skull...but could not understand what did u mean by One-fifth of the numbers rounded down, ......please explain again thnkx

Max B - 7 years, 1 month ago

Log in to reply

Read this wiki: Trailing zeros

Prasun Biswas - 6 years, 6 months ago

round(n/5)+round (n/25)+round(n/125)+....

so,

x=round(2007/5)+round(2007/25)+round(2007/125)+round(2007/625) x=401+80+16+3 x=500

Anil Kumar - 7 years, 1 month ago

Legendre!!

Satvik Golechha - 7 years ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...