Result

AC

Code [DL]

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

stdin

9059912072941663189216430998148681725883162575489240784381823506876256075271487251349199935043308993

stdout

0000000011111111111222222222233333333334444444445555555556666666677777777888888888888899999999999999

stderr

strace