Digit fifth powers: Difference between revisions
Content added Content deleted
Thundergnat (talk | contribs) m (syntax highlighting fixup automation) |
(Added Quackery.) |
||
Line 1,395: | Line 1,395: | ||
<pre>443839 195.04594802856445 ms |
<pre>443839 195.04594802856445 ms |
||
443839 22.282838821411133 ms</pre>Around eight times faster. |
443839 22.282838821411133 ms</pre>Around eight times faster. |
||
=={{header|Quackery}}== |
|||
As noted in the Julia example, 9^5*6 is an upper bound. |
|||
<syntaxhighlight lang="Quackery"> [ [] swap |
|||
[ 10 /mod |
|||
rot join swap |
|||
dup 0 = until ] |
|||
drop ] is digits ( n --> [ ) |
|||
0 |
|||
9 5 ** 6 * times |
|||
[ i^ 2 + |
|||
0 over digits |
|||
witheach |
|||
[ 5 ** + ] |
|||
= if [ i^ 2 + + ] ] |
|||
echo</syntaxhighlight> |
|||
{{out}} |
|||
<pre>443839</pre> |
|||
=={{header|Raku}}== |
=={{header|Raku}}== |