Result

AC

Duration

901ms

Code [DL]

while read s;do echo $((${s:${s:1:1}==${s:2:1}?2:4:1}));done

stdin

288 873
493 972
536 328
898 445
722 635
525 522
944 442
957 188
677 437
899 663
611 775
994 245
247 772
299 896
547 241
549 495
682 884
952 811
825 626
119 933
649 943
771 778
872 347
225 152
188 489
266 646
676 114
257 576
677 773
848 862
889 997
862 537

stdout

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

stderr

strace

10    execve("/bin/sh", ["/bin/sh", "/root/script", "/volume/CODE"], 0x7fffd20f11d0 /* 9 vars */) = 0
11    execve("/usr/bin/realpath", ["realpath", "/volume/CODE"], 0x55719ef19d18 /* 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-busybox/code.bas"...], 0x55719ef19d68 /* 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", "-"], 0x5571a03cc0d8 /* 9 vars */) = 0
14    execve("/usr/sbin/jk_chrootlaunch", ["jk_chrootlaunch", "-j", "/opt/jails/bash-busybox", "-x", "/bin/bash", "/code.bash"], 0x5571a03cc1c0 /* 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"], 0x7ffd55526a30 /* 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-busybox/code.bas"...], 0x55719ef19cc8 /* 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 +++