Project Euler Question 222

2.3k Views Asked by At

Would I be wrong to assume that the solution to this problem:

What is the length of the shortest pipe, of internal radius 50mm, that can fully contain 21 balls of radii 30mm, 31mm, ..., 50mm?

...involves stacking the balls, from largest to smallest, with each ball resting against the last on alternate sides of the pipe? Like so:

Most efficient packing arrangement?

Thus reducing this to a relatively straightforward geometry problem. The reason I ask is because my solution to this arrangement -- calculated in two different ways -- doesn't pass; so I guess there's some kind of subtlety that I'm missing (i.e., making false assumptions!).