## Task 5 - 290735

We consider the product of all natural numbers from 1 to 1000 inclusive.

Determine the number of zeros with which this product ends!
The number of zeros at the end of a number indicates how many times the factor $10=2 \cdot 5$ is contained in it. In the considered product

$$
1 \cdot 2 \cdot 3 \cdot 4 \cdot \ldots \cdot 997 \cdot 998 \cdot 999 \cdot 1000
$$

the factor 2 is contained in a higher power than the factor 5. Therefore, this product ends with as many zeros as the number of factors 5 contained in this product.

Among the numbers from 1 to 1000, there are exactly $1000: 5=200$ multiples of 5. Of these, exactly $1000: 25=40$ are divisible by 25, thus each contains two factors 5. Furthermore, exactly $1000: 125=8$ of these contain three factors 5. And exactly one number (namely 625) contains four factors 5.

Therefore, the mentioned product contains exactly $200+40+8+1=249$ factors 5 and thus ends with exactly 249 zeros.