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

Solution. Since $1400=7 \cdot 2^{3} \cdot 5^{2}$, the sought numbers can consist of the following digits: (a) three twos, two fives, one seven, and two ones, (b) one four, one two, two fives, one seven, and three ones, or (c) one eight, two fives, one seven, and four 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 two places out of the remaining five for the fives ( $C_{5}^{2}=\frac{5!}{3!2!}$ ways), and then one place out of the remaining three for the seven ( $C_{3}^{1}=1$ way). Finally, the remaining places are occupied by ones. By the rule of product, we get $C_{8}^{3} \cdot C_{5}^{2} \cdot 3=\frac{8!}{3!2!2!}=1680$ 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!}{2!4!}=840$. Finally, we get $1680+3360+840=5880$ ways.