Back to Freecodecamp

Problem 222: Sphere Packing

curriculum/challenges/english/blocks/project-euler-problems-201-to-300/5900f44b1000cf542c50ff5d.md

latest500 B
Original Source

--description--

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

Give your answer in micrometres (${10}^{-6}$ m) rounded to the nearest integer.

--hints--

spherePacking() should return 1590933.

js
assert.strictEqual(spherePacking(), 1590933);

--seed--

--seed-contents--

js
function spherePacking() {

  return true;
}

spherePacking();

--solutions--

js
// solution required