We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
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
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #222: Sphere Packing
You are viewing a single comment's thread. Return to all 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