Distinct power numbers: Difference between revisions

Content added Content deleted
m (syntax highlighting fixup automation)
(Added Quackery.)
Line 656: Line 656:
{{out}}
{{out}}
<pre> [1] 4 8 9 16 25 27 32 64 81 125 243 256 625 1024 3125</pre>
<pre> [1] 4 8 9 16 25 27 32 64 81 125 243 256 625 1024 3125</pre>

=={{header|Quackery}}==

<syntaxhighlight lang="Quackery"> [ [] swap
behead swap
witheach
[ 2dup = iff
drop done
dip join ]
join ] is unique ( [ --> [ )

[]
4 times
[ i 2 +
4 times
[ dup i 2 + **
rot join swap ]
drop ]
sort unique echo</syntaxhighlight>

{{out}}

<pre>[ 4 8 9 16 25 27 32 64 81 125 243 256 625 1024 3125 ]</pre>


=={{header|Raku}}==
=={{header|Raku}}==