8.1. Of all numbers with the sum of digits equal to 25, find the one whose product of digits is maximal. If there are several such numbers, write the smallest of them in the answer.
Answer: 33333334

Solution. Obviously, there is no 0 in the number. If the number contains the digit 1, then it can be removed and one of the remaining digits can be increased by 1, which does not change the sum, but increases the product. If the number contains a digit $x \geqslant 5$, then it can be replaced by the digits 2 and $x-2$, and the product will increase: $2(x-2)>x$ for $x>4$. Finally, if the number contains at least three twos or a two and a four, they can be replaced by two threes. If the number contains at least two fours, they can be replaced by 3, 3, and 2. Thus, in the number with the maximum product, in addition to threes, there can be no more than one four or no more than two twos. This is only possible if the number has 7 threes and either one four or two twos (in both cases, the products are the same). The smallest of the resulting numbers is 33333334.