Result

AC

Duration

1063ms

Code [DL]

console.log((""+require("fs").readFileSync(0)).replace(/.+/g,s=>s[s[1]-s[2]?4:2]))

stdin

464 421
255 554
319 772
737 625
574 747
189 899
699 593
177 662
454 448
296 266
598 595
799 964
997 771
985 234
766 265
133 557
628 815
361 225
482 284
343 535
242 196
571 774
292 299
662 683
811 582
457 353
688 881
976 943
592 998
896 943
722 453
377 756

stdout

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

stderr

strace

10    execve("/bin/sh", ["/bin/sh", "/root/script", "/volume/CODE"], 0x7ffc1a065580 /* 7 vars */) = 0
12    execve("/usr/bin/node", ["/usr/bin/node", "/volume/CODE"], 0x556d9d35dd40 /* 7 vars */ <unfinished ...>
11    execve("/bin/cat", ["cat", "-"], 0x556d9d35dd30 /* 7 vars */ <unfinished ...>
12    <... execve resumed>)             = 0
11    <... 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} ---
17    +++ exited with 0 +++
16    +++ exited with 0 +++
15    +++ exited with 0 +++
14    +++ exited with 0 +++
13    +++ exited with 0 +++
18    +++ 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=4, si_stime=1} ---
10    +++ exited with 0 +++