Result

WA

Duration

1083ms

Code [DL]

puts$<.map{_1[/(.)\1 /?2:4]}

stdin

843 413
166 115
399 734
133 225
942 244
221 822
391 414
522 417
472 921
985 725
474 256
458 282
899 994
571 714
216 995
693 336
699 925
899 294
193 795
431 137
716 652
886 889
267 744
234 448
963 636
767 641
766 461
782 884
788 877
526 492
559 226
622 224

stdout

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

stderr

/volume/CODE:1: warning: regex literal in condition

strace

10    execve("/bin/sh", ["/bin/sh", "/root/script", "/volume/CODE"], 0x7ffd5bbac6b0 /* 9 vars */) = 0
11    execve("/bin/cat", ["cat", "-"], 0x56261302cd40 /* 9 vars */ <unfinished ...>
12    execve("/usr/local/ruby-2.7.1/bin/ruby", ["/usr/local/ruby-2.7.1/bin/ruby", "/volume/CODE"], 0x56261302cd60 /* 9 vars */ <unfinished ...>
11    <... execve resumed>)             = 0
12    <... execve resumed>)             = 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    +++ 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=3} ---
10    +++ exited with 0 +++