Given an integer, output five perfect cubes whose sum is that integer. Note that cubes can be positive, negative, or zero. For example,
-10 == -27 +64 -27 64 + 12564 + 027 + -8127
so for input -10
you could output [-2764, -2764, 12564, 027, -81]27]
, though other solutions are possible. Note that you should output the cubes, not the numbers being cubed.
A solution always exists -- you might enjoy puzzling this out for yourself. It's further conjectured that four cubes suffice.