by@_hiromi_mi
WA
1190ms
import os fn main(){for a.len>0 {a:=os.get_line() print(a[if a[1]==a[2]{2}else{4}])}}
887 753 817 494 161 369 389 988 944 117 161 651 737 174 274 772 686 422 488 883 542 293 244 445 942 798 621 215 635 559 635 351 255 537 514 442 186 385 954 647 744 559 493 887 494 894 884 886 914 991 122 127 844 438 855 278 867 765 744 253 395 936 899 492
/tmp/code.v:2:15: error: undefined: `a` 1| import os 2| fn main(){for a.len>0 {a:=os.get_line() ^ 3| print(a[if a[1]==a[2]{2}else{4}])}}
11 execve("/bin/sh", ["/bin/sh", "/root/script", "/volume/CODE"], 0x7fff6f8b4610 /* 7 vars */) = 0 12 execve("/usr/bin/realpath", ["realpath", "/volume/CODE"], 0x55fe79e02d18 /* 7 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/cp", ["cp", "-f", "/volume/CODE", "/tmp/code.v"], 0x55fe79e02d38 /* 7 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("/bin/cat", ["cat", "-"], 0x55fe79e02d58 /* 7 vars */) = 0 15 execve("/root/v", ["/root/v", "run", "/tmp/code.v"], 0x55fe79e02d80 /* 7 vars */) = 0 14 +++ exited with 0 +++ 11 --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=14, si_uid=0, si_status=0, si_utime=0, si_stime=0} --- 15 +++ exited with 1 +++ 11 --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=15, si_uid=0, si_status=1, si_utime=3, si_stime=3} --- 11 +++ exited with 1 +++