Lets generalize the topic - colored/painted cube cut into dimension of 1*1*1 Say the cube be of n*n*n size which is then cut into n^3 cubes of dimension 1*1*1.
the number of small cubes with 3 sides painted are the corner most (cube/cuboid have 8 Vertices) cubes -
8 only irrespective of n. (4 smaller cubes on top and 4 cubes in bottom)
the number of small cubes with 2 sides painted - are the cubes at the edges (less the corner most cubes) -
\((n-2) * 12\). A cube has 12 edges.
the number of small cubes with 1 side painted - are the balance cubes on the face (cube has 6 square face) of each cube =
\((n-2)^2 * 6\)the number of small cubes with 0 side painted - are the cubes which are inside -
\((n-2)^3\)Now coming back to the question
here, n=7
Approach 1sum of cubes with 3 side painted + cubes with 2 side painted + cubes with 1 side painted = \(8 + (7-2)*12 + (7-2)^2 * 6 = 8+60+150 = 218\).
Approach 2total no of cubes = \(n^3 = 7^3 = 343\)
total cubes which are inside with 0 sides painted = \((7-2)^3 = 125\)
therefore, the number of smaller cubes which have at least one face painted blue is = \(343 - 125 = 218\)
Answer: D