3a

Petya has $n^{3}$ white cubes $1 \times 1 \times 1$. He wants to assemble them into a cube $n \times n \times n$, which is completely white on the outside. What is the minimum number of faces of the cubes Vasya needs to paint to prevent Petya? Solve the problem for a) $n=2$; b) $n=3$.
a) It is enough to paint two opposite faces of one cube. One painted face would not be enough: Petya would "hide" it inside.

b) Vasya needs to completely paint two cubes - you can't hide both inside.

Suppose only 11 faces are painted. Arrange the cubes in descending order of the number of painted faces. Only the first one can be completely painted, and two or more painted faces can only be on the first five. Hide the first one in the center of the large cube, and place the next six in the centers of its faces "white side out." Each of the remaining cubes has no more than one painted face, and it can always be turned inward.

## Answer

a) 2 faces b) 12 faces.