27 regular dice were glued together to form a $3 \times 3 \times 3$ cube in such a way that on any two adjacent small cubes, the same number of dots is on the touching faces. How many dots are on the surface of the large cube?
I. solution. On a regular die, any two opposite faces have a total of 7 dots.

Take any small outer cube and one of its outer faces. If the number of dots on this face is $x$, then the face opposite to it has $7-x$ dots. According to the problem, the face that touches the $(7-x)$-faced side also has $7-x$ dots. The face opposite to this one has $7-(7-x)=x$ dots, the face that touches this one also has $x$ dots, and finally, the face that touches this one again has $7-x$ dots (see the figure).
![](https://cdn.mathpix.com/cropped/2024_05_02_09631cee7cda5a5e8dbdg-1.jpg?height=288&width=856&top_left_y=392&top_left_x=624)

It can be observed that this last face is on the surface of the large cube and can be uniquely matched to the face of the original small cube, as it is opposite to it. Therefore, the $6 \cdot 3^{2}=54$ small faces on the surface of the large cube can be paired such that each face is in exactly one pair, and the sum of the dots on the faces in each pair is 7. Since $\frac{54}{2}=27$ such pairs exist, the total number of dots on the surface of the cube is $27 \cdot 7=189$.

Remark. Similarly, it can be proven that the number of dots on the surface of a $(2 n+1) \times(2 m+1) \times(2 k+1)$ rectangular prism with the property described in the problem is

$$
7 \cdot[(2 n+1)(2 m+1)+(2 n+1)(2 k+1)+(2 m+1)(2 k+1)]
$$

II. solution. On the surface of a regular die, each pair of opposite faces has a total of 7 dots, and there are three pairs of faces on a die. Therefore, a single die has $3 \cdot 7=21$ dots, and 27 dice have a total of $27 \cdot 21=567$ dots. From this number, the number of dots on the glued faces must be subtracted.

Take three cubes glued side by side. The middle cube has a total of 7 dots on its glued faces. The other two cubes have the same number of dots on their glued faces as the middle cube, which is also 7 dots. Therefore, a set of three cubes hides 14 dots.

Each pair of opposite faces of the large cube defines 9 such sets of three cubes, totaling 27 sets of three cubes, so the number of hidden dots is $27 \cdot 14=378$.

Therefore, the total number of dots on the surface of the large cube is $567-378=189$.