Question 1137885
<br>
Let the dimensions of the rectangular block be (a+2), (b+2), and (c+2).  Then the unit cubes with no faces painted form a block with dimensions a, b, and c.<br>
The number of cubes with no faces painted is to be 30, so the product abc is equal to 30.  There are 5 sets of integer dimensions with that product:<br>
1x1x30
1x2x15
1x3x10
1x5x6
2x3x5<br>
On the rectangular block, the unit cubes with 2 faces painted are on the edges, but not on the corners.  There are 12 edges on a rectangular solid.  In our rectangular solid with dimensions (a+2), (b+2), and (c+2), there are 4 edges with length a (not counting the corners), 4 edges with length b (not counting the corners), and 4 edges with length c (not counting the corners).<br>
So, given the dimensions a, b, and c of the block of unit cubes with no faces painted, the number of units cubes with 2 faces painted is 4(a+b+c).<br>
With the analysis of the problem complete, we now just plug in numbers to find the answer to the problem.<br><pre>
(1) abc = 1*1*30 --> 4(a+b+c) = 4(32) = 128
(2) abc = 1*2*15 --> 4(a+b+c) = 4(18) =  72
(3) abc = 1*3*10 --> 4(a+b+c) = 4(14) =  56
(4) abc = 1*5*6  --> 4(a+b+c) = 4(12) =  48
(5) abc = 2*3*5  --> 4(a+b+c) = 4(10) =  40
                                       -----
                                        344<br></pre>
ANSWER: 344