Project Euler #222: Sphere Packing

  • + 4 comments

    Hi ,

    For the third test case I'm getting 533543 . i did it on papers as well still the answer is 533543. Here is my answer details:

    Balls are arranged in descending order. Distance between centre of : a) 1st ball and 2nd ball = 107.703 b) 2nd and 3rd ball = 103.923 c) 3rd and 4th ball = 100 d) 4th and 5th ball = 95.917

    total distance between centre of 1st ball (radius 65) to last ball (radius 61) = 407.543

    adding the radius of 1st and last ball to get the min. height of pipe = 407.543 + 65 + 61 = 533.543

    Answer : 533543.

    Could you please let me know where i am going wrong . I feel my answer is correct