Result

AC

Code [DL]

$'d'
 -(!!)()()#
$'p'
 -(!!)-()o\
   @-/     1
     >g0{d}s-@
    #
$'f'
 -(!!)(!c!)(c)()2mc2c(!z!)(!y!)(!x!)(y)(){p}(!P!)(c)()()9q#
$'g'-i2mc2c(!e!)1a(!!)0()p()z1sc(!!)(!d!)()p(e)p{g}#
 -e<
    #
$'h'  -1a{h}#
 -{f}<
      #
$'main'
 -[00000]{d}p{d}p{g}0{h}#

stdin

2060833494526524581245886182501882810786177899017962373976102041034677760140855594411471979319384623

stdout

0000000000111111111111122222222233333333444444444445555555566666666677777777777888888888888999999999

stderr

strace