APL (Dyalog Unicode), 13 bytesSBCS
⊃,/,¨∘.,\⎕⍴⊂⍞
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
⊃,/,¨∘.,\⎕⍴⊂⍞
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