Result

AC

Duration

1038ms

Code [DL]

define a: readline
if(eq ($a::slice 1 2) ($a::slice 2 3)){
echo: $a::slice 2 3
}else: echo: $a::slice 4 5
source $0


stdin

986 692
722 668
244 426
766 761
761 166
638 433
566 551
314 156
856 497
488 587
311 117
928 221
854 553
722 682
545 458
113 998
859 255
537 379
152 374
669 991
744 447
854 443
776 688
117 717
699 188
345 495
167 176
776 992
315 497
877 796
249 298
948 626

stdout

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

stderr

CODE: 2: error/runtime: slice starts after last element

strace

10    execve("/bin/sh", ["/bin/sh", "/root/script", "/volume/CODE"], 0x7ffed94c52e0 /* 7 vars */) = 0
11    execve("/bin/cat", ["cat", "-"], 0x55828b10c048 /* 7 vars */) = 0
13    execve("/usr/bin/go", ["/usr/bin/go", "env", "GOPATH"], 0x55828b10c078 /* 7 vars */ <unfinished ...>
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} ---
13    <... execve resumed>)             = 0
17    +++ exited with 0 +++
16    +++ exited with 0 +++
14    +++ exited with 0 +++
15    +++ exited with 0 +++
13    +++ exited with 0 +++
12    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=13, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
12    execve("/root/go/bin/oh", ["/root/go/bin/oh", "/volume/CODE"], 0x55828b10c068 /* 7 vars */) = 0
18    +++ exited with 0 +++
20    +++ exited with 0 +++
23    +++ exited with 0 +++
19    +++ exited with 0 +++
22    +++ exited with 0 +++
21    +++ exited with 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=5, si_stime=8} ---
10    +++ exited with 0 +++