Result

WA

Duration

908ms

Code [DL]

import std.stdio;int main(){string s=readln;write=s[s[1]-s[2]?4:2];main();}

stdin

822 224
933 738
149 893
473 133
773 559
127 446
466 771
931 116
944 422
677 628
728 521
662 645
145 937
893 459
151 945
235 339
442 422
344 449
566 995
427 771
618 814
799 742
747 449
287 879
341 491
558 898
521 584
724 428
599 592
782 982
499 981
163 326

stdout

stderr

/tmp/code.d:1:22: error: function D main has no return statement, but is expected to return a value of type int
 import std.stdio;int main(){string s=readln;write=s[s[1]-s[2]?4:2];main();}
                      ^
/root/script: 7: /root/script: /tmp/code: not found
rm: cannot remove '/tmp/code': No such file or directory

strace

11    execve("/bin/sh", ["/bin/sh", "/root/script", "/volume/CODE"], 0x7ffdf7884d90 /* 6 vars */) = 0
12    execve("/usr/bin/realpath", ["realpath", "/volume/CODE"], 0x555bd935ec00 /* 6 vars */) = 0
12    +++ exited with 0 +++
11    --- 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/ln", ["ln", "-sf", "/volume/CODE", "/tmp/code.d"], 0x555bd935ec20 /* 6 vars */) = 0
13    +++ exited with 0 +++
11    --- 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("/usr/bin/gdc", ["gdc", "/tmp/code.d", "-o", "/tmp/code"], 0x555bd935ec18 /* 6 vars */) = 0
15    execve("/usr/lib/gcc/x86_64-linux-gnu/8/cc1d", ["/usr/lib/gcc/x86_64-linux-gnu/8/"..., "/tmp/code.d", "-quiet", "-dumpbase", "code.d", "-mtune=generic", "-march=x86-64", "-auxbase", "code", "-imultiarch", "x86_64-linux-gnu", "-o", "/tmp/cccheZzd.s"], 0x19d65e0 /* 11 vars */) = 0
15    +++ exited with 1 +++
14    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=15, si_uid=0, si_status=1, si_utime=6, si_stime=1} ---
14    +++ exited with 1 +++
11    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=14, si_uid=0, si_status=1, si_utime=0, si_stime=0} ---
16    execve("/bin/cat", ["cat", "-"], 0x555bd935ebe8 /* 6 vars */ <unfinished ...>
17    execve("/tmp/code", ["/tmp/code"], 0x555bd935ebd0 /* 6 vars */) = -1 ENOENT (No such file or directory)
16    <... execve resumed> )            = 0
17    +++ exited with 127 +++
16    +++ exited with 0 +++
11    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=17, si_uid=0, si_status=127, si_utime=0, si_stime=0} ---
18    execve("/bin/rm", ["rm", "/tmp/code.d", "/tmp/code"], 0x555bd935ebd0 /* 6 vars */) = 0
18    +++ exited with 1 +++
11    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=18, si_uid=0, si_status=1, si_utime=0, si_stime=0} ---
11    +++ exited with 1 +++