My solution is below. You can also look at SilverKnight's solution here.
Let n be the edge length of the large cube
Case 1: 1 face is painted. Then 217 = n^2
No integer solution.
Case 2: 2 adjacent faces are painted. Then 217 = 2*n^2 - n
No integer solution.
Case 3: 2 opposite faces are painted. Then 217 = 2*n^2
No integer solution.
Case 4: 3 faces sharing a corner are painted. Then 217 = 3*n^2 - 3*n + 1
0 = 3*n^2 - 3*n - 216 = 3*(n - 9)*(n + 8). n = 9 or -8
Case 5: 3 faces wrapping around the cube are painted. Then 217 = 3*n^2 - 2*n
No integer solution.
Case 6: 4 faces are painted, with the unpainted faces adjacent. Then 217 = 4*n^2 - 5*n + 2
No integer solution.
Case 7: 4 faces are painted, with the unpainted faces opposite. Then 217 = 4*n^2 - 4*n
No integer solution.
Case 8: 5 faces are painted. Then 217 = 5*n^2 - 8*n + 4
No integer solution.
Case 9: all 6 faces are painted. Then 217 = 6*n^2 - 12*n + 8
No integer solution.
The only case with an integer solution is case 4 with n = 9 or -8. Since n must be positive, n is 9
and the total number of cubes is 9^3 = 729. |