## 2. Megacube

From identical small cubes, one large cube is assembled. The length of the edge of the large cube is a hundred times greater 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: $\quad 788$
## Solution.

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

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

The number of cubes with exactly two red sides is

$4 \cdot 98 + 4 \cdot 99 = 392 + 396 = 788$.

![](https://cdn.mathpix.com/cropped/2024_05_30_3b422eeffac9eaba122eg-2.jpg?height=371&width=667&top_left_y=416&top_left_x=1206)