Result

AC

Duration

781ms

Code [DL]

\def\p#1#2#3#4#5#6{\if#2#3#3\else#4\fi}\newcount\k=0\loop\ifnum\k<32\read0to\i\edef\o{\expandafter\p\i}\expandafter\write\expandafter0\expandafter{\o}\advance\k1\repeat\end

stdin

522 257
514 178
841 486
482 228
711 732
261 668
893 339
477 758
677 653
966 667
155 257
142 241
221 728
411 119
751 719
196 998
426 724
385 125
713 779
336 361
824 279
399 558
694 665
132 329
699 191
871 168
117 268
817 711
533 667
334 456
571 373
998 288

stdout

2 
1 
4 
2 
1 
6 
3 
7 
7 
6 
5 
2 
7 
1 
7 
9 
7 
1 
7 
3 
2 
9 
6 
3 
9 
1 
2 
7 
3 
4 
3 
2 

stderr

strace

10    execve("/bin/sh", ["/bin/sh", "/root/script", "/volume/CODE"], 0x7ffdebddc9f0 /* 6 vars */) = 0
11    execve("/bin/cat", ["cat", "-"], 0x55ceb3a55be0 /* 6 vars */) = 0
11    +++ exited with 0 +++
10    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=11, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
13    execve("/bin/cat", ["cat", "-", "/volume/CODE"], 0x55ceb517e5d0 /* 6 vars */) = 0
12    +++ exited with 0 +++
10    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=12, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
13    +++ exited with 0 +++
10    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=13, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
14    execve("/usr/local/texlive/2020/bin/x86_64-linux/tex", ["/usr/local/texlive/2020/bin/x86_"..., "code.tex"], 0x55ceb517e868 /* 7 vars */ <unfinished ...>
15    execve("/bin/sed", ["sed", "-e", "1,2d"], 0x55ceb517e898 /* 7 vars */) = 0
14    <... execve resumed> )            = 0
17    execve("/bin/sed", ["sed", "-e", "$d"], 0x55ceb517e898 /* 7 vars */ <unfinished ...>
16    execve("/bin/sed", ["sed", "-e", "$d"], 0x55ceb517e898 /* 7 vars */ <unfinished ...>
17    <... execve resumed> )            = 0
16    <... execve resumed> )            = 0
18    execve("/bin/sed", ["sed", "-e", "$d"], 0x55ceb517e898 /* 7 vars */) = 0
14    +++ exited with 0 +++
10    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=14, si_uid=0, si_status=0, si_utime=0, si_stime=1} ---
15    +++ exited with 0 +++
10    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=15, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
16    +++ exited with 0 +++
10    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=16, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
17    +++ exited with 0 +++
10    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=17, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
18    +++ exited with 0 +++
10    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=18, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
19    execve("/bin/rm", ["rm", "code.log"], 0x55ceb3a55b78 /* 7 vars */) = 0
19    +++ exited with 0 +++
10    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=19, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
20    execve("/bin/rm", ["rm", "code.dvi"], 0x55ceb3a55b78 /* 7 vars */) = 0
20    +++ exited with 0 +++
10    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=20, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
21    execve("/bin/rm", ["rm", "code.tex"], 0x55ceb3a55b78 /* 7 vars */) = 0
21    +++ exited with 0 +++
10    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=21, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
22    execve("/bin/rm", ["rm", "stdin.tex"], 0x55ceb3a55b78 /* 7 vars */) = 0
22    +++ exited with 0 +++
10    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=22, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
10    +++ exited with 0 +++