Skip to main content
switched from Classic to Unicode because the code that enables boxing stopped working in Classic
Source Link
ngn
  • 15.3k
  • 2
  • 43
  • 87

APL (Dyalog ClassicUnicode), 13 bytesSBCS

⊃,/,¨∘.,\⎕⍴⊂⍞

Try it online!Try it online!

never miss an opportunity to use a scan :)

prompts for a string of "digits" and then for n

thanks @Adám for telling me how to enable ]box on TIO

APL (Dyalog Classic), 13 bytes

⊃,/,¨∘.,\⎕⍴⊂⍞

Try it online!

never miss an opportunity to use a scan :)

prompts for a string of "digits" and then for n

thanks @Adám for telling me how to enable ]box on TIO

APL (Dyalog Unicode), 13 bytesSBCS

⊃,/,¨∘.,\⎕⍴⊂⍞

Try it online!

never miss an opportunity to use a scan :)

prompts for a string of "digits" and then for n

thanks @Adám for telling me how to enable ]box on TIO

added 26 characters in body
Source Link
ngn
  • 15.3k
  • 2
  • 43
  • 87

APL (Dyalog UnicodeClassic), 2613 bytes

⊃,/,¨∘.,\⎕⍴⊂⍞

Try it online!Try it online!

never miss an opportunity to use a scan :)

prompts for a string of "digits" and then for n

duethanks @Adám for telling me how to APL's default formatting, the first few characters in the output appear close together but they are separate elements of the result arrayenable ]box on TIO

APL (Dyalog Unicode), 26 bytes

⊃,/,¨∘.,\⎕⍴⊂⍞

Try it online!

never miss an opportunity to use a scan :)

prompts for a string of "digits" and then for n

due to APL's default formatting, the first few characters in the output appear close together but they are separate elements of the result array

APL (Dyalog Classic), 13 bytes

⊃,/,¨∘.,\⎕⍴⊂⍞

Try it online!

never miss an opportunity to use a scan :)

prompts for a string of "digits" and then for n

thanks @Adám for telling me how to enable ]box on TIO

Source Link
ngn
  • 15.3k
  • 2
  • 43
  • 87

APL (Dyalog Unicode), 26 bytes

⊃,/,¨∘.,\⎕⍴⊂⍞

Try it online!

never miss an opportunity to use a scan :)

prompts for a string of "digits" and then for n

due to APL's default formatting, the first few characters in the output appear close together but they are separate elements of the result array