5. [4 points] Find the number of eight-digit numbers, the product of whose digits equals 7000. The answer should be presented as an integer.
Answer: 5600.

Solution. Since $7000=7 \cdot 2^{3} \cdot 5^{3}$, the sought numbers can consist of the following digits: (a) three twos, three fives, one seven, and one one, (b) four, two, three fives, one seven, and two ones, or (c) eight, three fives, one seven, and three ones. We will calculate the number of variants in each case.

(a) First, we choose three places out of eight for the twos ( $C_{8}^{3}=\frac{8!}{3!5!}$ ways), then three places out of the remaining five for the fives ( $C_{5}^{3}=\frac{5!}{3!2!}$ ways), and then one place out of the remaining two for the seven ( $C_{2}^{1}=2$ ways). Finally, the remaining places are occupied by ones. By the rule of product, we get $C_{8}^{3} \cdot C_{5}^{3} \cdot 2=\frac{8!}{3!3!}=1120$ ways.

(b) Reasoning similarly, we find that the number of ways in this case is $\frac{8!}{2!3!}=3360$.
(c) Reasoning similarly, we find that the number of ways in this case is $\frac{8!}{3!3!}=1120$. Finally, we get $1120+3360+1120=5600$ ways.