Result

AC

Duration

1884ms

Code [DL]

(define$z(lambda[](do{(let{[$x(unpack(io(read-line)))]}(writeChar(nth(if(equal(nth 2 x)(nth 3 x))2 5)x)))}(z))))(define$main(lambda[$a](do{[(z)]}[])))

stdin

693 933
388 883
422 243
355 559
219 962
322 924
911 775
458 756
475 153
397 992
144 479
575 225
552 599
293 772
671 776
213 321
496 661
267 453
548 843
691 212
588 864
692 775
884 238
149 347
922 525
825 527
659 522
899 845
548 484
411 443
462 225
911 365

stdout

98259217194257736482872325594121

stderr

egison: <stdin>: hGetLine: end of file

strace

10    execve("/bin/sh", ["/bin/sh", "/root/script", "/volume/CODE"], 0x7ffd97adb730 /* 6 vars */) = 0
11    execve("/usr/bin/realpath", ["realpath", "/volume/CODE"], 0x5606f4fd0c00 /* 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    execve("/bin/ln", ["ln", "-s", "/volume/CODE", "/tmp/code.segi"], 0x5606f4fd0c20 /* 6 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", "-"], 0x5606f4fd0c18 /* 6 vars */) = 0
14    execve("/usr/bin/egison", ["/usr/bin/egison", "/tmp/code.segi"], 0x5606f4fd0c28 /* 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} ---
16    +++ exited with 0 +++
18    +++ exited with 0 +++
17    +++ exited with 0 +++
15    +++ exited with 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=59, si_stime=15} ---
19    execve("/bin/rm", ["rm", "-f", "/tmp/code.segi"], 0x5606f4fd0bc0 /* 6 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} ---
10    +++ exited with 0 +++