Result

WA

Duration

937ms

Code [DL]

import os
fn main(){for 1 {a:=os.get_line()
print(a[if a[1]==a[2]{2}else{4}])}}

stdin

599 193
878 887
579 589
995 589
244 471
631 157
783 833
763 778
753 531
511 175
477 661
899 475
847 864
855 755
829 243
117 524
284 553
994 844
229 924
532 223
578 481
944 959
355 774
853 959
928 822
542 442
984 681
122 223
628 226
461 316
838 322
844 443

stdout

stderr

/tmp/code.v:2:15: error: non-bool used as for condition 
    1| import os
    2| fn main(){for 1 {a:=os.get_line()
                     ^
    3| print(a[if a[1]==a[2]{2}else{4}])}}

strace

10    execve("/bin/sh", ["/bin/sh", "/root/script", "/volume/CODE"], 0x7ffdf2158f90 /* 7 vars */) = 0
11    execve("/usr/bin/realpath", ["realpath", "/volume/CODE"], 0x55c80a715d18 /* 7 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", "/tmp/code.v"], 0x55c80a715d38 /* 7 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} ---
14    execve("/root/v", ["/root/v", "run", "/tmp/code.v"], 0x55c80a715d80 /* 7 vars */ <unfinished ...>
13    execve("/bin/cat", ["cat", "-"], 0x55c80a715d58 /* 7 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 resumed>)             = 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=5, si_stime=3} ---
10    +++ exited with 1 +++