Result

AC

Duration

1110ms

Code [DL]

\endlinechar=-1
\def\p#1#2#3#4#5#6{\if#2#3#3\else#4\fi}
\newcount\i
\i=0
\loop
\ifnum\i<32
\read0 to \inputtext
\edef\outtext{\expandafter\p\inputtext}
\expandafter\write\expandafter0\expandafter{\outtext}
\advance\i by1
\repeat
\end

stdin

742 434
286 878
937 532
741 519
688 883
647 834
466 784
326 624
277 686
648 112
844 491
587 281
877 772
729 227
897 684
425 421
539 931
519 946
837 775
788 558
274 749
899 665
155 583
477 171
223 252
214 116
682 254
255 656
424 247
485 995
547 772
551 715

stdout

4
8
5
5
8
8
6
6
7
1
4
2
7
2
6
4
9
9
7
8
7
9
5
7
2
1
2
5
2
9
7
7

stderr

strace

10    execve("/bin/sh", ["/bin/sh", "/root/script", "/volume/CODE"], 0x7ffd6ce9b0e0 /* 6 vars */) = 0
11    execve("/bin/cat", ["cat", "-"], 0x55e8fa3d8be0 /* 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} ---
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    execve("/bin/cat", ["cat", "-", "/volume/CODE"], 0x55e8fc3415d0 /* 6 vars */) = 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"], 0x55e8fc341868 /* 7 vars */ <unfinished ...>
15    execve("/bin/sed", ["sed", "-e", "1,2d"], 0x55e8fc341898 /* 7 vars */ <unfinished ...>
14    <... execve resumed> )            = 0
15    <... execve resumed> )            = 0
16    execve("/bin/sed", ["sed", "-e", "$d"], 0x55e8fc341898 /* 7 vars */) = 0
18    execve("/bin/sed", ["sed", "-e", "$d"], 0x55e8fc341898 /* 7 vars */) = 0
17    execve("/bin/sed", ["sed", "-e", "$d"], 0x55e8fc341898 /* 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=0} ---
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} ---
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} ---
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} ---
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"], 0x55e8fa3d8b78 /* 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"], 0x55e8fa3d8b78 /* 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"], 0x55e8fa3d8b78 /* 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"], 0x55e8fa3d8b78 /* 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 +++