Skip to main content
deleted 10 characters in body
Source Link
pxeger
  • 25.3k
  • 4
  • 59
  • 146

Zsh, 4138 bytes

for i (${(s::)@});repeat $[++n]++n printf $i 

Try it online!Try it online!

-8 bytes thanks to roblogic

Zsh, 41 bytes

for i (${(s::)@});repeat $[++n] printf $i 

Try it online!

-8 bytes thanks to roblogic

Zsh, 38 bytes

for i (${(s::)@});repeat ++n printf $i 

Try it online!

-8 bytes thanks to roblogic

added 59 characters in body
Source Link
pxeger
  • 25.3k
  • 4
  • 59
  • 146

Zsh, 4941 bytes

for i ({1..$#1})c=${1[i]} s+=$${(pl:is::$c:)@} <<<$s);repeat $[++n] printf $i 

Try it online!Try it online!

-8 bytes thanks to roblogic

Zsh, 49 bytes

for i ({1..$#1})c=${1[i]} s+=${(pl:i::$c:)} <<<$s 

Try it online!

Zsh, 41 bytes

for i (${(s::)@});repeat $[++n] printf $i 

Try it online!

-8 bytes thanks to roblogic

Source Link
pxeger
  • 25.3k
  • 4
  • 59
  • 146

Zsh, 49 bytes

for i ({1..$#1})c=${1[i]} s+=${(pl:i::$c:)} <<<$s 

Try it online!