## 2. Megacube

From identical small cubes, one large cube is assembled. The length of the edge of the large cube is a hundred times larger than the length of the edge of each small cube. The large cube is placed on a table, and all its sides, except the one that touches the table, are painted red.

How many small cubes have exactly two red sides?

Result:
## Solution.

Along each of the four edges of the top face of the cube, there are 98 smaller cubes with two red sides.

Along each of the four side edges of the cube, there are 99 smaller cubes with two red sides.

The number of smaller cubes with exactly two red sides is $4 \cdot 98 + 4 \cdot 99 = 392 + 396 = 788$

![](https://cdn.mathpix.com/cropped/2024_05_30_1fa462ef9f831ff2e2d1g-2.jpg?height=401&width=537&top_left_y=130&top_left_x=1358)