Result

AC

Duration

786ms

Code [DL]

read a b;echo $[b%110<9?b/100%b:a%10]&&. $0

stdin

447 749
266 669
993 195
716 646
591 158
173 198
254 523
396 775
174 488
868 428
326 663
126 241
592 423
855 458
719 113
674 379
744 773
947 971
559 952
266 452
131 837
611 175
122 559
899 584
318 181
661 617
655 353
442 554
635 337
199 996
166 617
963 337

stdout

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

stderr

/code.bash: line 1: b%110<9?b/100%b:a%10: division by 0 (error token is "b:a%10")

strace

10    execve("/bin/sh", ["/bin/sh", "/root/script", "/volume/CODE"], 0x7ffc05059cd0 /* 9 vars */) = 0
11    execve("/usr/bin/realpath", ["realpath", "/volume/CODE"], 0x5558f1a1dd18 /* 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"], 0x5558f1a1dd58 /* 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", "-"], 0x5558f222b0d8 /* 9 vars */) = 0
14    execve("/usr/sbin/jk_chrootlaunch", ["jk_chrootlaunch", "-j", "/opt/jails/bash-pure", "-x", "/bin/bash", "/code.bash"], 0x5558f222b1c0 /* 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"], 0x7ffe68515d60 /* 9 vars */) = 0
14    +++ exited with 1 +++
10    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=14, si_uid=0, si_status=1, si_utime=0, si_stime=1} ---
15    execve("/bin/rm", ["rm", "/opt/jails/bash-pure/code.bash"], 0x5558f1a1dcb8 /* 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 +++