Own digits power sum: Difference between revisions

m
(→‎{{header|Visual Basic .NET}}: Replaced with a translation of Algol 68)
Line 17:
=={{header|ALGOL 68}}==
Non-recursive, generates the possible combinations ands the own digits power sums in reverse order, without duplication.<br>
Uses ideas from various solutions on this page, particularly the observation that the own digits power sum is independent of the order of the digits. Uses the minimum possible highest digit for the number of digits (width) and maximum number of zeros for the width to avoid some combinations. This trys 73 359 combinations, so not as optimosed as the Pascal solution, however it is much faster than the previous Algol 68 version.
<lang algol68>BEGIN
# counts of used digits, check is a copy used to check the number is an own digit power sum #
3,043

edits