Hello, annie3993!
A giant wooden cube is painted green on all 6 sides and then cut into 125 identical smaller cubes.
How many of these smaller cubes are painted on exactly two faces? This is a 5 × 5 × 5 cube.
A cube has 6 faces, 12 edges, and 8 corners (vertices).
Let's look at one face. Code:
* - * - * - * - * - *
| 3 | 2 | 2 | 2 | 3 |
* - * - * - * - * - *
| 2 | 1 | 1 | 1 | 2 |
* - * - * - * - * - *
| 2 | 1 | 1 | 1 | 2 |
* - * - * - * - * - *
| 2 | 1 | 1 | 1 | 2 |
* - * - * - * - * - *
| 3 | 2 | 2 | 2 | 3 |
* - * - * - * - * - *
The nine cubes in the center have one face painted green.
The four cubes in the corners have three faces painted green.
On each edge, there are three cubes with two green faces.
Since there are 12 edges, there are: cubes with two green faces.