Result

AC

Duration

1588ms

Code [DL]

package main
import."fmt"
func main(){for{a:=""
b:=a
Scan(&a,&b)
if a[1]==a[2]{b=a[2:]}
Print(b[:1])}}

stdin

197 997
281 733
195 442
459 598
266 776
867 765
142 223
644 481
925 236
379 394
176 228
483 359
377 778
565 697
442 447
778 782
816 917
254 144
433 833
283 936
426 667
566 227
576 982
344 147
144 638
322 462
279 477
325 221
648 895
716 618
822 224
733 345

stdout

97456724232376479139669442428623

stderr

panic: runtime error: index out of range [1] with length 0

goroutine 1 [running]:
main.main()
	/tmp/code.go:6 +0x1e3

strace

10    execve("/bin/sh", ["/bin/sh", "/root/script", "/volume/CODE"], 0x7ffd0dc43800 /* 7 vars */) = 0
11    execve("/usr/bin/realpath", ["realpath", "/volume/CODE"], 0x56536340cd18 /* 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/ln", ["ln", "-sf", "/volume/CODE", "/tmp/code.go"], 0x56536340cd38 /* 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} ---
13    execve("/usr/bin/go", ["/usr/bin/go", "build", "-o", "/tmp/code", "/tmp/code.go"], 0x565363ff0028 /* 7 vars */) = 0
20    execve("/usr/lib/go/pkg/tool/linux_amd64/compile", ["/usr/lib/go/pkg/tool/linux_amd64"..., "-V=full"], 0xc000291110 /* 25 vars */) = 0
21    execve("/usr/lib/go/pkg/tool/linux_amd64/compile", ["/usr/lib/go/pkg/tool/linux_amd64"..., "-V=full"], 0xc000136b60 /* 25 vars */) = 0
25    +++ exited with 0 +++
24    +++ exited with 0 +++
23    +++ exited with 0 +++
26    +++ exited with 0 +++
20    +++ exited with 0 +++
19    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=20, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
27    execve("/usr/lib/go/pkg/tool/linux_amd64/asm", ["/usr/lib/go/pkg/tool/linux_amd64"..., "-V=full"], 0xc000136d00 /* 25 vars */) = 0
29    +++ exited with 0 +++
30    +++ exited with 0 +++
28    +++ exited with 0 +++
31    +++ exited with 0 +++
21    +++ exited with 0 +++
15    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=21, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
32    execve("/usr/lib/go/pkg/tool/linux_amd64/asm", ["/usr/lib/go/pkg/tool/linux_amd64"..., "-V=full"], 0xc000136f70 /* 25 vars */) = 0
35    +++ exited with 0 +++
33    +++ exited with 0 +++
34    +++ exited with 0 +++
36    +++ exited with 0 +++
27    +++ exited with 0 +++
22    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=27, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
38    +++ exited with 0 +++
37    +++ exited with 0 +++
39    +++ exited with 0 +++
32    +++ exited with 0 +++
16    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=32, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
40    execve("/usr/lib/go/pkg/tool/linux_amd64/compile", ["/usr/lib/go/pkg/tool/linux_amd64"..., "-o", "/tmp/go-build488212276/b001/_pkg"..., "-trimpath", "/tmp/go-build488212276/b001=>", "-p", "main", "-complete", "-buildid", "X3fFGfkHtpjA6OTYPOlY/X3fFGfkHtpj"..., "-goversion", "go1.13.10", "-D", "_/tmp", "-importcfg", "/tmp/go-build488212276/b001/impo"..., "-pack", "-c=2", "/tmp/code.go"], 0xc0004104e0 /* 25 vars */) = 0
44    +++ exited with 0 +++
42    +++ exited with 0 +++
41    +++ exited with 0 +++
43    +++ exited with 0 +++
40    +++ exited with 0 +++
15    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=40, si_uid=0, si_status=0, si_utime=1, si_stime=1} ---
45    execve("/usr/lib/go/pkg/tool/linux_amd64/link", ["/usr/lib/go/pkg/tool/linux_amd64"..., "-V=full"], 0xc0004108f0 /* 25 vars */) = 0
49    ????( <unfinished ...>
48    +++ exited with 0 +++
47    +++ exited with 0 +++
49    +++ exited with 0 +++
46    +++ exited with 0 +++
45    +++ exited with 0 +++
16    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=45, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
50    execve("/usr/lib/go/pkg/tool/linux_amd64/link", ["/usr/lib/go/pkg/tool/linux_amd64"..., "-o", "/tmp/go-build488212276/b001/exe/"..., "-importcfg", "/tmp/go-build488212276/b001/impo"..., "-buildmode=exe", "-buildid=pgcTqz4r7v1UFv9QThdf/X3"..., "-extld=gcc", "/tmp/go-build488212276/b001/_pkg"...], 0xc000410d00 /* 25 vars */) = 0
54    +++ exited with 0 +++
52    +++ exited with 0 +++
51    +++ exited with 0 +++
53    +++ exited with 0 +++
50    +++ exited with 0 +++
16    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=50, si_uid=0, si_status=0, si_utime=17, si_stime=6} ---
22    +++ exited with 0 +++
16    +++ exited with 0 +++
15    +++ exited with 0 +++
19    +++ exited with 0 +++
17    +++ exited with 0 +++
14    +++ exited with 0 +++
18    +++ exited with 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=5, si_stime=13} ---
55    execve("/bin/cat", ["cat", "-"], 0x56536340cd08 /* 7 vars */ <unfinished ...>
56    execve("/tmp/code", ["/tmp/code"], 0x56536340ccf0 /* 7 vars */) = 0
55    <... execve resumed>)             = 0
55    +++ exited with 0 +++
10    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=55, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
59    +++ exited with 2 +++
58    +++ exited with 2 +++
57    +++ exited with 2 +++
56    +++ exited with 2 +++
10    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=56, si_uid=0, si_status=2, si_utime=0, si_stime=0} ---
60    execve("/bin/rm", ["rm", "/tmp/code.go", "/tmp/code"], 0x56536340ccf0 /* 7 vars */) = 0
60    +++ exited with 0 +++
10    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=60, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
10    +++ exited with 0 +++