Result

AC

Code [DL]

while read -n1 c;do a[c]+=$c;done
for i in {0..9};do echo -n ${a[i]};done

stdin

8461086800664035103701995484852260336713079156512918758303691300616250789884179585376704875695355292

stdout

0000000000000111111111122222233333333334444445555555555555666666666666777777777888888888888999999999

stderr

/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)

strace