Result

AC

Duration

1168ms

Code [DL]

-export([main/1]).
f()->{_,[B,C,E]}=io:fread("","~*c~c~c ~c~*s"),io:format(if B==C->B;1>0->E end).
main(_)->[f()||_<-lists:seq(1,32)].

stdin

522 198
851 665
159 553
354 532
585 585
855 251
549 991
687 833
916 942
383 335
949 198
973 733
699 937
982 258
624 324
494 992
376 688
155 553
789 981
327 275
714 578
633 361
573 938
688 183
933 552
522 445
213 168
376 886
759 374
261 964
699 993
188 697

stdout

26555598931792396592539832183998

stderr

strace

10    execve("/bin/sh", ["/bin/sh", "/root/script", "/volume/CODE"], 0x7ffd847ec0f0 /* 7 vars */) = 0
11    execve("/bin/cat", ["cat", "-"], 0x56008cf1ad38 /* 7 vars */ <unfinished ...>
12    execve("/usr/bin/escript", ["/usr/bin/escript", "/volume/CODE"], 0x56008cf1ad50 /* 7 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    execve("/usr/bin/erl", ["/usr/bin/erl", "+B", "-boot", "no_dot_erlang", "-noshell", "-run", "escript", "start", "-extra", "/volume/CODE"], 0x56352a7f75e0 /* 8 vars */) = 0
14    +++ exited with 0 +++
13    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=14, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
15    execve("/bin/sed", ["sed", "s/.*\\///"], 0x5584d1f59168 /* 8 vars */) = 0
15    +++ exited with 0 +++
13    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=15, si_uid=0, si_status=0, si_utime=0, si_stime=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("/usr/lib/erlang/erts-10.6.4/bin/erlexec", ["/usr/lib/erlang/erts-10.6.4/bin/"..., "+B", "-boot", "no_dot_erlang", "-noshell", "-run", "escript", "start", "-extra", "/volume/CODE"], 0x5584d1f59170 /* 12 vars */) = 0
12    execve("/usr/lib/erlang/erts-10.6.4/bin/beam.smp", ["/volume/CODE", "-B", "--", "-root", "/usr/lib/erlang", "-progname", "erl", "--", "-home", "/root", "--", "-boot", "no_dot_erlang", "-noshell", "-run", "escript", "start", "--", "-extra", "/volume/CODE"], 0x7ffeef0a29a0 /* 12 vars */) = 0
19    execve("/usr/lib/erlang/erts-10.6.4/bin/erl_child_setup", ["erl_child_setup", "1024"], 0x7ffc3eb2dab0 /* 12 vars */) = 0
36    execve("/bin/sh", ["sh", "-c", "exec inet_gethost 4 "], 0x7fde4292e660 /* 12 vars */) = 0
36    execve("/usr/lib/erlang/erts-10.6.4/bin/inet_gethost", ["inet_gethost", "4"], 0x561c13703cf8 /* 12 vars */) = 0
36    +++ exited with 0 +++
19    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=36, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
37    --- SIGUSR1 {si_signo=SIGUSR1, si_code=SI_USER, si_pid=36, si_uid=0} ---
37    +++ killed by SIGUSR1 +++
18    +++ exited with 0 +++
35    +++ exited with 0 +++
34    +++ exited with 0 +++
33    +++ exited with 0 +++
32    +++ exited with 0 +++
31    +++ exited with 0 +++
30    +++ exited with 0 +++
29    +++ exited with 0 +++
28    +++ exited with 0 +++
27    +++ exited with 0 +++
26    +++ exited with 0 +++
25    +++ exited with 0 +++
24    +++ exited with 0 +++
23    +++ exited with 0 +++
22    +++ exited with 0 +++
17    +++ exited with 0 +++
16    +++ exited with 0 +++
20    +++ 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=25, si_stime=9} ---
19    +++ exited with 0 +++
10    +++ exited with 0 +++