Strange numbers: Difference between revisions
m
→{{header|Wren}}: Changed to Wren S/H
(A) |
m (→{{header|Wren}}: Changed to Wren S/H) |
||
(One intermediate revision by one other user not shown) | |||
Line 2,408:
<syntaxhighlight lang="Quackery"> [ ' [ 2 3 5 7 11 13 17 ]
find 7 < ] is prime
[ 10 /mod
Line 2,414:
tuck - abs prime not iff
[ 2drop false ] done
- abs prime ] is strange
[] 399 times
[ i^ 101 +
dup strange
join else drop ]
dup size echo
Line 2,787:
=={{header|Wren}}==
===Basic task===
<syntaxhighlight lang="
var count = 0
var d = []
Line 2,828:
... though I've generated the 'possibles' table rather than hard-code it.
Runtime about 0.085 seconds which is quick for Wren.
<syntaxhighlight lang="
var possibles = List.filled(10, null)
for (i in 0..9) {
|