Result

AC

Duration

920ms

Code [DL]

while read l;do
[ ${l:1:1} = ${l:2:1} ]&&echo ${l:1:1}||echo ${l:4:1}
done

stdin

224 443
235 116
876 926
866 614
727 274
688 881
161 816
344 554
868 181
613 359
844 177
544 249
122 223
519 138
359 992
738 383
471 171
349 946
593 172
221 994
657 559
442 942
424 341
988 183
484 439
522 156
823 228
578 474
579 514
533 116
554 595
877 741

stdout

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

stderr

strace

10    execve("/bin/sh", ["/bin/sh", "/root/script", "/volume/CODE"], 0x7fff51b14550 /* 9 vars */) = 0
11    execve("/usr/bin/realpath", ["realpath", "/volume/CODE"], 0x55e095fa5d18 /* 9 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    execve("/bin/cp", ["cp", "-f", "/volume/CODE", "/opt/jails/bash-pure/code.bash"], 0x55e095fa5d58 /* 9 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    execve("/bin/cat", ["cat", "-"], 0x55e0974370d8 /* 9 vars */) = 0
14    execve("/usr/sbin/jk_chrootlaunch", ["jk_chrootlaunch", "-j", "/opt/jails/bash-pure", "-x", "/bin/bash", "/code.bash"], 0x55e0974371c0 /* 9 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("/bin/bash", ["/bin/bash", "/code.bash"], 0x7ffd3507eaa0 /* 9 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    execve("/bin/rm", ["rm", "/opt/jails/bash-pure/code.bash"], 0x55e095fa5cb8 /* 9 vars */) = 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} ---
10    +++ exited with 0 +++