Jump to content

Euler's sum of powers conjecture: Difference between revisions

m (syntax highlighting fixup automation)
Line 1,550:
 
=={{header|EasyLang}}==
<syntaxhighlight lang="text">n = 250
n = 250
len p5[] n
len h5[] 65537
for i range= 0 to n - 1
p5[i + 1] = i * i * i * i * i
h5[p5[i + 1] mod 65537 + 1] = 1
.
func search a s . y .
Line 1,562 ⟶ 1,563:
while a + 1 < b
i = (a + b) div 2
if p5[i + 1] > s
b = i
elif p5[i + 1] < s
a = i
else
Line 1,572 ⟶ 1,573:
.
.
for x0 range= 0 to n - 1
for x1 range= 0 to x0
sum1 = p5[x0 + 1] + p5[x1 + 1]
for x2 range= 0 to x1
sum2 = p5[x2 + 1] + sum1
for x3 range= 0 to x2
sum = p5[x3 + 1] + sum2
if h5[sum mod 65537 + 1] = 1
call search x0 sum y
if y >= 0
Line 1,589 ⟶ 1,590:
.
.
.
.</syntaxhighlight>
 
=={{header|EchoLisp}}==
2,083

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.