Skip to main content
Tweeted twitter.com/StackCodeGolf/status/981504021776265216
deleted 3 characters in body
Source Link
Stewie Griffin
  • 46.5k
  • 13
  • 132
  • 295

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.

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 + -27 + 125 + 0 + -81

so for input -10 you could output [-27, -27, 125, 0, -81], 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.

Given an integer, output five perfect cubes whose sum is that integer. Note that cubes can be positive, negative, or zero. For example,

-10 == -64 - 64 + 64 + 27 + 27

so for input -10 you could output [-64, -64, 64, 27, 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.

Source Link
xnor
  • 146.6k
  • 26
  • 279
  • 652

Sum of five cubes

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 + -27 + 125 + 0 + -81

so for input -10 you could output [-27, -27, 125, 0, -81], 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.