Sum of the digits of n is substring of n: Difference between revisions

Content added Content deleted
(Added Quackery.)
Line 1,767: Line 1,767:
200 300 400 500 600 700 800 900 910 911
200 300 400 500 600 700 800 900 910 911
912 913 914 915 916 917 918 919</pre>
912 913 914 915 916 917 918 919</pre>

=={{header|Quackery}}==

<syntaxhighlight lang="Quackery"> [ over findseq swap found ] is hasseq ( [ [ --> b )

[ [] swap
[ 10 /mod
rot join swap
dup 0 = until ]
drop ] is digits ( n --> [ )

[ digits
0 over witheach +
digits hasseq ] is subsum ( n --> b )

[] 1000 times
[ i^ subsum if
[ i^ join ] ]
dup echo
cr cr
say "There are " size echo say " numbers."</syntaxhighlight>

{{out}}

<pre>[ 0 1 2 3 4 5 6 7 8 9 10 20 30 40 50 60 70 80 90 100 109 119 129 139 149 159 169 179 189 199 200 300 400 500 600 700 800 900 910 911 912 913 914 915 916 917 918 919 ]

There are 48 numbers.</pre>


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