user
There is a conjecture in mathematics that held for over two hundred years before it was disproved by the finding of a counterexample in 1966 by Lander and Parkin.

This conjecture is called Euler's sum of powers conjecture and can be stated as such:

:   At least k positive kth powers are required to sum to a kth power, except for the trivial case of one kth power: yk = yk.

In 1966, Leon J. Lander and Thomas R. Parkin used a brute-force search on a CDC 6600 computer restricting numbers to those less than 250.

The task consists in writing a program to search for an integer solution of 

x

0

5
+

x

1

5
+

x

2

5
+

x

3

5
=

y

5
{\displaystyle {\displaystyle x\_{0}^{5}+x\_{1}^{5}+x\_{2}^{5}+x\_{3}^{5}=y^{5}}}
 where all 

x

i
{\displaystyle {\displaystyle x\_{i}}}
 and 

y
{\displaystyle {\displaystyle y}}
 are distinct integers between 0 and 250 (exclusive). Show an answer here.

Related tasks are:

* Pythagorean quadruples.
* Pythagorean triples.
assistant
(formerly Perl 6)

**Translation of**: Python

```
constant MAX = 250;

my  %po5{Int};
my %sum2{Int};

for 1..MAX -> \i {
    %po5{i⁵} = i;
    for 1..MAX -> \j {
        %sum2{i⁵ + j⁵} = i, j;
    }
}

%po5.keys.sort.race.map: -> \p {
    for %sum2.keys.sort -> \s {
        if p > s and %sum2{p - s} {
            say ((sort |%sum2{s},|%sum2{p - s}) X~ '⁵').join(' + '), " = %po5{p}", "⁵" and exit
        }
    }
}

```

Output:

```
27⁵ + 84⁵ + 110⁵ + 133⁵ = 144⁵
```