Project Euler 126: could someone explain?
Project Euler 126 says: "If we then add a second layer to this solid it would require forty-six cubes to cover every visi开发者_JAVA技巧ble face."
How come? I thought lay another 3x2x1 over a 3x2x1 makes it 3x2x2, and you need 6 to cover the top, 6 to cover the bottom, 3+2+3+2 to cover each layer, so the total is 32, every white color face is covered, right? How am I wrong here? I have thought hard, but I don't understand. Thanks in advance.
I believe the intention is to cover the covered cuboid.
first you need 22 to cover the six sides. then you need to cover 3 different corners, which needs 3* 4 + 2*4 + 1*4 = 24. totally 46.
精彩评论