Result

AC

Code [DL]

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

stdin

2903545534964871127699149478484285293217390785315410181003852017578061962920435040459642204565352242

stdout

0000000000011111111112222222222222333333334444444444444455555555555556666667777777888888889999999999

stderr

strace