A 3 by 3 by 3 cube was painted on all faces and then cut apart into twenty-seven 1 by 1 by 1 cubes.
How many 1 by 1 by 1 cubes had no faces painted? One face painted? Two faces painted? Three faces painted? Four or more faces painted? Answer the same question with for a 4 by 4 by 4 cube.
For 3x3:
Little cubes which are located in vertexes of the big cube will be 3 faces painted. There are 8 such cubes. 12 cubes will be 2 faces painted and 6 cubes – 1 face painted. Cube which lies in the center of big one will be no face painted.
For 4x4:
Little cubes which are located in vertexes of the big cube will be 3 faces painted. There are 8 such cubes. 24 cubes will be 2 faces painted and 24 cubes – 1 face painted. 8 cubes which lie in the center of big one will be no face painted.