Result

AC

Code [DL]

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

stdin

4645674348653634919901377240993184152498352284580425896052629702366886150187691242097390482546148362

stdout

0000000011111111222222222222333333333444444444444445555555556666666666667777778888888888899999999999

stderr

strace