Step 1: Understanding the Concept:
In a painted cube, different types of small cubes are formed based on their position:
- 3 faces painted: Corner cubes.
- 2 faces painted: Edge cubes (excluding corners).
- 1 face painted: Face center cubes.
- 0 faces painted: Inner core cubes.
Step 2: Key Formula or Approach:
Number of cubes with exactly 2 faces painted is given by:
\[ 12(n - 2) \]
where $n$ is the number of small cubes along one edge.
Step 3: Detailed Explanation:
1. Total small cubes = 27.
2. Edge length $n = \sqrt[3]{27} = 3$.
3. Two-colored cubes are found on the edges of the large cube. A cube has 12 edges.
4. Using the formula:
\[ 12(3 - 2) = 12(1) = 12 \]
5. Since opposite faces have the same color and adjacent faces have different colors, every edge cube (excluding corners) will necessarily have two different colors.
Step 4: Final Answer:
There are 12 cubes that have two colors.