Result

WA

Duration

850ms

Code [DL]

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

stdin

293 978
992 921
813 463
889 913
856 552
433 321
148 589
243 345
211 912
674 932
617 719
299 975
853 588
993 543
711 115
232 229
881 613
973 885
855 552
965 655
244 554
658 451
935 339
355 454
563 886
329 328
477 211
831 895
822 669
811 234
125 559
127 785

stdout

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

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"], 0x7ffdcb526960 /* 9 vars */) = 0
11    execve("/usr/bin/realpath", ["realpath", "/volume/CODE"], 0x55b27a63cd18 /* 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"], 0x55b27a63cd58 /* 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", "-"], 0x55b27b9820d8 /* 9 vars */) = 0
14    execve("/usr/sbin/jk_chrootlaunch", ["jk_chrootlaunch", "-j", "/opt/jails/bash-pure", "-x", "/bin/bash", "/code.bash"], 0x55b27b9821c0 /* 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"], 0x7ffdce2f1fb0 /* 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=3} ---
15    execve("/bin/rm", ["rm", "/opt/jails/bash-pure/code.bash"], 0x55b27a63ccb8 /* 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 +++