## 9. 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: $\quad 788$
## Solution.

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

Along each of the 4 side edges of the cube, there are 99 cubes with two red 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_44689c7bad1ce05a818cg-5.jpg?height=385&width=529&top_left_y=2060&top_left_x=1248)