9.5. The older brother took identical uncolored cubes from Misha and used them to build a large cube. After that, he completely painted some (not all) faces of the large cube red. When the paint dried, Misha disassembled the large cube and found that exactly 343 small cubes had no red faces. How many faces of the large cube did Misha's brother paint? Justify your answer.
Solution: We will call a small cube that has a red face painted. The size of the large cube is greater than 7 (since only the unpainted cubes amount to $343=7^{3}$, and there are also painted ones), but less than 9 (since all "internal" cubes are unpainted - no more than $7^{3}$). Therefore, it is equal to 8. Out of $8^{3}=512$ cubes that make it up, $6^{3}=216$ are "internal." There remain $343-216=127$ unpainted cubes, which lie on the boundary of the large cube. Each unpainted face will give 36 such cubes (the inner square $6 \times 6$), so there are fewer than four unpainted faces. We will prove that there are at least three. Indeed, if there are fewer, then all corner cubes are painted, and the number of unpainted boundary cubes is even. Therefore, three faces, which have a common vertex, are not painted. Let's check that an $8 \times 8 \times 8$ cube with three unpainted adjacent faces fits. In it, there are $3 \cdot 6^{2}=108$ unpainted cubes (inner cubes of the faces) plus $3 \cdot 6=18$ - cubes on the common edge of two unpainted faces plus one corner - exactly 127 cubes.

Answer: 3 faces.

Recommendations for checking:

| is in the work | points |
| :--- | :--- |
| Correct and fully justified answer | 7 points |
| Proven that there can only be 3 faces, but not shown that the described situation is possible | 6 points |
| Justified that the cube has a size of $8 \times 8 \times 8$, but not proven that the number of painted faces cannot differ from 3 | 4 points |
| Correct answer and an example of a cube and coloring, but the uniqueness is not justified | 2 points |
| Answer without justification and/or incorrect answer | 0 points |