Digit fifth powers: Difference between revisions

Content added Content deleted
m (→‎{{header|Pascal}}: changed output format to be more compact)
m (→‎{{header|Pascal}}: correct lost summing of last number in list tmp +=Numbers[High(Numbers)];)
Line 647: Line 647:
end;
end;
write(Numb2USA(IntToStr(Numbers[High(Numbers)])),' = ');
write(Numb2USA(IntToStr(Numbers[High(Numbers)])),' = ');
tmp +=Numbers[High(Numbers)];
writeln('sum to ',Numb2USA(IntToStr(tmp)));
writeln('sum to ',Numb2USA(IntToStr(tmp)));
end;
end;
Line 665: Line 666:


Exponent : 3 used 990 recursions
Exponent : 3 used 990 recursions
153 + 370 + 371 + 407 = sum to 894
153 + 370 + 371 + 407 = sum to 1,301


Exponent : 4 used 2992 recursions
Exponent : 4 used 2992 recursions
1,634 + 8,208 + 9,474 = sum to 9,842
1,634 + 8,208 + 9,474 = sum to 19,316


Exponent : 5 used 7997 recursions
Exponent : 5 used 7997 recursions
4,150 + 4,151 + 54,748 + 92,727 + 93,084 + 194,979 = sum to 248,860
4,150 + 4,151 + 54,748 + 92,727 + 93,084 + 194,979 = sum to 443,839


Exponent : 6 used 19437 recursions
Exponent : 6 used 19437 recursions
548,834 = sum to 0
548,834 = sum to 548,834


Exponent : 7 used 43747 recursions
Exponent : 7 used 43747 recursions
1,741,725 + 4,210,818 + 9,800,817 + 9,926,315 + 14,459,929 = sum to 25,679,675
1,741,725 + 4,210,818 + 9,800,817 + 9,926,315 + 14,459,929 = sum to 40,139,604


Exponent : 8 used 92367 recursions
Exponent : 8 used 92367 recursions
24,678,050 + 24,678,051 + 88,593,477 = sum to 49,356,101
24,678,050 + 24,678,051 + 88,593,477 = sum to 137,949,578


Exponent : 9 used 184745 recursions
Exponent : 9 used 184745 recursions
146,511,208 + 472,335,975 + 534,494,836 + 912,985,153 = sum to 1,153,342,019
146,511,208 + 472,335,975 + 534,494,836 + 912,985,153 = sum to 2,066,327,172


Exponent : 10 used 352705 recursions
Exponent : 10 used 352705 recursions
4,679,307,774 = sum to 0
4,679,307,774 = sum to 4,679,307,774


Exponent : 11 used 646635 recursions
Exponent : 11 used 646635 recursions
32,164,049,650 + 32,164,049,651 + 40,028,394,225 + 42,678,290,603 + 44,708,635,679 + 49,388,550,606 + 82,693,916,578 + 94,204,591,914 = sum to 323,825,886,992
32,164,049,650 + 32,164,049,651 + 40,028,394,225 + 42,678,290,603 + 44,708,635,679 + 49,388,550,606 + 82,693,916,578 + 94,204,591,914 = sum to 418,030,478,906


Exponent : 12 used 1144055 recursions
Exponent : 12 used 1144055 recursions


Exponent : 13 used 1961245 recursions
Exponent : 13 used 1961245 recursions
564,240,140,138 = sum to 0
564,240,140,138 = sum to 564,240,140,138


Exponent : 14 used 3268749 recursions
Exponent : 14 used 3268749 recursions
28,116,440,335,967 = sum to 0
28,116,440,335,967 = sum to 28,116,440,335,967


Exponent : 15 used 5311724 recursions
Exponent : 15 used 5311724 recursions


Exponent : 16 used 8436274 recursions
Exponent : 16 used 8436274 recursions
4,338,281,769,391,370 + 4,338,281,769,391,371 = sum to 4,338,281,769,391,370
4,338,281,769,391,370 + 4,338,281,769,391,371 = sum to 8,676,563,538,782,741


Exponent : 17 used 13123099 recursions
Exponent : 17 used 13123099 recursions
233,411,150,132,317 + 21,897,142,587,612,075 + 35,641,594,208,964,132 + 35,875,699,062,250,035 = sum to 57,772,147,946,708,524
233,411,150,132,317 + 21,897,142,587,612,075 + 35,641,594,208,964,132 + 35,875,699,062,250,035 = sum to 93,647,847,008,958,559


Exponent : 18 used 20029999 recursions
Exponent : 18 used 20029999 recursions


Exponent : 19 used 30045004 recursions
Exponent : 19 used 30045004 recursions
1,517,841,543,307,505,039 + 3,289,582,984,443,187,032 + 4,498,128,791,164,624,869 + 4,929,273,885,928,088,826 = sum to 9,305,553,318,915,316,940
1,517,841,543,307,505,039 + 3,289,582,984,443,187,032 + 4,498,128,791,164,624,869 + 4,929,273,885,928,088,826 = sum to 14,234,827,204,843,405,766


Max Uint64 18,446,744,073,709,551,615</pre>
Max Uint64 18,446,744,073,709,551,615
</pre>


=={{header|Perl}}==
=={{header|Perl}}==