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

m
(Added Quackery.)
 
(One intermediate revision by the same user not shown)
Line 2,326:
=={{header|Quackery}}==
 
<code>from</code>, <code>index</code> and <code>andend</code> are defined at [[Loops/Increment loop index within loop body#Quackery]].
 
<syntaxhighlight lang="Quackery"> [ 0 swap
Line 2,334:
drop ] is digitsum ( n --> n )
 
[] 401 times
40 times
[ i^ 1+ 1 from
[ dup dup index *
[ dup dup digitsumindex = if*
digitsum = [ index swap end ] ]if
[ dup dup [ index *swap end ] ]
1+ dropdip join ]
drop echo</syntaxhighlight>
 
{{out}}
 
1,496

edits