New Al Zimmermann's Programming Contests: Powerful Sums
azspcs.com·11h·
Discuss: Hacker News
Flag this post
  • “Never underestimate the powerful sums that arise when small numbers conspire.” *
  • Zaryth Velmire

The Contest

Given a positive integer n, find n n-digit integers with distinct absolute values, the sum of whose n-th powers is non-zero but otherwise as close to zero as possible.

Example #1

For n = 3 you might choose the following three 3-digit numbers: (468, 126, -471). The sum of their cubes is (468)3 + (126)3 + (-471)3 = (102503232) + (2000276) + (-104487111) = 123.

Alternatively, you might choose (-665, -780, 916). The sum of the cubes is (-665)3 + (-780)3 + (916)3 = (-294079625) + (-474552000) + (768575296) = -529.

Of these two solutions, the first is better because 123 is closer to zero than is -529.

Example #2

The…

Similar Posts

Loading similar posts...