Minimum multiple of m where digital sum equals m: Difference between revisions

m
→‎{{header|Quackery}}: simplified code
(Add ABC)
m (→‎{{header|Quackery}}: simplified code)
(One intermediate revision by the same user not shown)
Line 2,323:
19 109 73 37 199 73 37 271 172 1333
289 559 1303 847 1657 833 1027 1576 1282 17497</pre>
 
=={{header|Quackery}}==
 
<code>from</code>, <code>index</code> and <code>and</code>are defined at [[Loops/Increment loop index within loop body#Quackery]].
 
<syntaxhighlight lang="Quackery"> [ 0 swap
[ 10 /mod
rot + swap
dup 0 = until ]
drop ] is digitsum ( n --> n )
 
[] 1
40 times
[ 1 from
[ dup dup index *
digitsum = if
[ index swap end ] ]
1+ dip join ]
drop echo</syntaxhighlight>
{{out}}
 
<pre>[ 1 1 1 1 1 1 1 1 1 19 19 4 19 19 13 28 28 11 46 199 19 109 73 37 199 73 37 271 172 1333 289 559 1303 847 1657 833 1027 1576 1282 17497 ]</pre>
 
=={{header|Raku}}==
1,496

edits