UVa 386

From Algorithmist
Jump to navigation Jump to search

Problem Number - Problem Name[edit]

Summary[edit]

Find all instances of four integers, {a, b, c, d}, where a3=b3+c3+d3 and 1 < {a,b,c,d} <= 2000. Sort the list and triplets, and print the entries according to the specified output.

Note: The problem description varies slightly; read the specification for any differences.

Explanation[edit]

Explanation of the ideas behind the solution goes here.

Gotchas[edit]

  • {a,b,c,d} > 1.

Notes[edit]

Implementations[edit]

Optimizations[edit]

  • Explicit sorting should not be required.

Input[edit]

No input, unless otherwise specified by the problem.

Output[edit]

Cube = 6, Triple = (3,4,5)
Cube = 12, Triple = (6,8,10)
Cube = 18, Triple = (2,12,16)
Cube = 18, Triple = (9,12,15)
Cube = 19, Triple = (3,10,18)
Cube = 20, Triple = (7,14,17)
Cube = 24, Triple = (12,16,20)

References[edit]

  1. Reference 1