Result

AC

Duration

1194ms

Code [DL]

sed ':L
s/\(.\)9/\1\1\1\1\1\1\1\1\1/
s/\(.\)8/\1\1\1\1\1\1\1\1/
s/\(.\)7/\1\1\1\1\1\1\1/
s/\(.\)6/\1\1\1\1\1\1/
s/\(.\)5/\1\1\1\1\1/
s/\(.\)4/\1\1\1\1/
s/\(.\)3/\1\1\1/
s/\(.\)2/\1\1/
tL'

stdin

t9b5f6sm5o2f8r9b3mk8j4z5n4d7h6r4w4t9j4a6v6e2x4w9p7e3b4o2v4v8u7x3y4q6d3i4l3b6f5k4v3g9y3h6naufc7

stdout

tttttttttbbbbbffffffsmmmmmooffffffffrrrrrrrrrbbbmkkkkkkkkjjjjzzzzznnnndddddddhhhhhhrrrrwwwwtttttttttjjjjaaaaaavvvvvveexxxxwwwwwwwwwpppppppeeebbbboovvvvvvvvvvvvuuuuuuuxxxyyyyqqqqqqdddiiiilllbbbbbbfffffkkkkvvvgggggggggyyyhhhhhhnaufccccccc

stderr

strace