Result

AC

Code [DL]

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

stdin

1740683785178257191881100200952787418369908740529130816175725879945326767315177259358310586560560496

stdout

0000000000011111111111112222222333333344444555555555555566666666677777777777777888888888888999999999

stderr

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

strace