Result

AC

Duration

1629ms

Code [DL]

use std::io::*;fn main(){let b=&mut[0;8];stdin().read(b);print!("{}",b[if b[1]==b[2]{2}else{4}]-48);main()}

stdin

655 664
547 473
411 196
522 729
488 184
345 547
591 197
588 887
367 993
932 398
298 387
269 667
689 424
211 138
346 441
717 732
762 364
266 397
237 939
711 119
611 654
741 119
564 648
567 315
563 991
435 549
884 945
453 714
388 997
228 276
119 993
175 657

stdout

54128518933641473691116395978296

stderr

warning: function cannot return without recursing
 --> /tmp/code.rs:1:16
  |
1 | use std::io::*;fn main(){let b=&mut[0;8];stdin().read(b);print!("{}",b[if b[1]==b[2]{2}else{4}]-48);main()}
  |                ^^^^^^^^^ cannot return without recursing                                            ------ recursive call site
  |
  = note: `#[warn(unconditional_recursion)]` on by default
  = help: a `loop` may express intention better if this is on purpose

warning: unused `std::result::Result` that must be used
 --> /tmp/code.rs:1:42
  |
1 | use std::io::*;fn main(){let b=&mut[0;8];stdin().read(b);print!("{}",b[if b[1]==b[2]{2}else{4}]-48);main()}
  |                                          ^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(unused_must_use)]` on by default
  = note: this `Result` may be an `Err` variant, which should be handled

thread 'main' panicked at 'attempt to subtract with overflow', /tmp/code.rs:1:70
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

strace

10    execve("/bin/sh", ["/bin/sh", "/root/script", "/volume/CODE"], 0x7ffd3fec2940 /* 7 vars */) = 0
11    execve("/usr/bin/realpath", ["realpath", "/volume/CODE"], 0x5557a6836d18 /* 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.rs"], 0x5557a6836d38 /* 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/rustc", ["/usr/bin/rustc", "-o", "/tmp/code", "/tmp/code.rs"], 0x5557a6836d48 /* 7 vars */) = 0
17    +++ exited with 0 +++
19    +++ exited with 0 +++
25    +++ exited with 0 +++
20    +++ exited with 0 +++
22    +++ exited with 0 +++
18    +++ exited with 0 +++
26    +++ exited with 0 +++
28    +++ exited with 0 +++
27    +++ exited with 0 +++
24    +++ exited with 0 +++
21    +++ exited with 0 +++
29    +++ exited with 0 +++
23    +++ exited with 0 +++
30    +++ exited with 0 +++
33    +++ exited with 0 +++
15    --- SIGUSR1 {si_signo=SIGUSR1, si_code=SI_TKILL, si_pid=13, si_uid=0} ---
32    +++ exited with 0 +++
31    +++ exited with 0 +++
15    +++ exited with 0 +++
16    +++ exited with 0 +++
34    execve("/usr/lib/rustlib/x86_64-alpine-linux-musl/bin/cc", ["cc", "-Wl,--as-needed", "-Wl,-z,noexecstack", "-Wl,--eh-frame-hdr", "-m64", "-L", "/usr/lib/rustlib/x86_64-alpine-l"..., "/tmp/code.code.7rcbfp3g-cgu.0.rc"..., "/tmp/code.code.7rcbfp3g-cgu.1.rc"..., "/tmp/code.code.7rcbfp3g-cgu.10.r"..., "/tmp/code.code.7rcbfp3g-cgu.11.r"..., "/tmp/code.code.7rcbfp3g-cgu.12.r"..., "/tmp/code.code.7rcbfp3g-cgu.13.r"..., "/tmp/code.code.7rcbfp3g-cgu.14.r"..., "/tmp/code.code.7rcbfp3g-cgu.15.r"..., "/tmp/code.code.7rcbfp3g-cgu.2.rc"..., "/tmp/code.code.7rcbfp3g-cgu.3.rc"..., "/tmp/code.code.7rcbfp3g-cgu.4.rc"..., "/tmp/code.code.7rcbfp3g-cgu.5.rc"..., "/tmp/code.code.7rcbfp3g-cgu.6.rc"..., "/tmp/code.code.7rcbfp3g-cgu.7.rc"..., "/tmp/code.code.7rcbfp3g-cgu.8.rc"..., "/tmp/code.code.7rcbfp3g-cgu.9.rc"..., "-o", "/tmp/code", "/tmp/code.14qnxy4t7ap9bmcs.rcgu."..., "-Wl,--gc-sections", "-pie", "-Wl,-zrelro", "-Wl,-znow", "-nodefaultlibs", "-L", ...], 0x55ff28d300e0 /* 7 vars */) = -1 ENOENT (No such file or directory)
34    execve("/bin/cc", ["cc", "-Wl,--as-needed", "-Wl,-z,noexecstack", "-Wl,--eh-frame-hdr", "-m64", "-L", "/usr/lib/rustlib/x86_64-alpine-l"..., "/tmp/code.code.7rcbfp3g-cgu.0.rc"..., "/tmp/code.code.7rcbfp3g-cgu.1.rc"..., "/tmp/code.code.7rcbfp3g-cgu.10.r"..., "/tmp/code.code.7rcbfp3g-cgu.11.r"..., "/tmp/code.code.7rcbfp3g-cgu.12.r"..., "/tmp/code.code.7rcbfp3g-cgu.13.r"..., "/tmp/code.code.7rcbfp3g-cgu.14.r"..., "/tmp/code.code.7rcbfp3g-cgu.15.r"..., "/tmp/code.code.7rcbfp3g-cgu.2.rc"..., "/tmp/code.code.7rcbfp3g-cgu.3.rc"..., "/tmp/code.code.7rcbfp3g-cgu.4.rc"..., "/tmp/code.code.7rcbfp3g-cgu.5.rc"..., "/tmp/code.code.7rcbfp3g-cgu.6.rc"..., "/tmp/code.code.7rcbfp3g-cgu.7.rc"..., "/tmp/code.code.7rcbfp3g-cgu.8.rc"..., "/tmp/code.code.7rcbfp3g-cgu.9.rc"..., "-o", "/tmp/code", "/tmp/code.14qnxy4t7ap9bmcs.rcgu."..., "-Wl,--gc-sections", "-pie", "-Wl,-zrelro", "-Wl,-znow", "-nodefaultlibs", "-L", ...], 0x55ff28d300e0 /* 7 vars */) = -1 ENOENT (No such file or directory)
34    execve("/usr/local/sbin/cc", ["cc", "-Wl,--as-needed", "-Wl,-z,noexecstack", "-Wl,--eh-frame-hdr", "-m64", "-L", "/usr/lib/rustlib/x86_64-alpine-l"..., "/tmp/code.code.7rcbfp3g-cgu.0.rc"..., "/tmp/code.code.7rcbfp3g-cgu.1.rc"..., "/tmp/code.code.7rcbfp3g-cgu.10.r"..., "/tmp/code.code.7rcbfp3g-cgu.11.r"..., "/tmp/code.code.7rcbfp3g-cgu.12.r"..., "/tmp/code.code.7rcbfp3g-cgu.13.r"..., "/tmp/code.code.7rcbfp3g-cgu.14.r"..., "/tmp/code.code.7rcbfp3g-cgu.15.r"..., "/tmp/code.code.7rcbfp3g-cgu.2.rc"..., "/tmp/code.code.7rcbfp3g-cgu.3.rc"..., "/tmp/code.code.7rcbfp3g-cgu.4.rc"..., "/tmp/code.code.7rcbfp3g-cgu.5.rc"..., "/tmp/code.code.7rcbfp3g-cgu.6.rc"..., "/tmp/code.code.7rcbfp3g-cgu.7.rc"..., "/tmp/code.code.7rcbfp3g-cgu.8.rc"..., "/tmp/code.code.7rcbfp3g-cgu.9.rc"..., "-o", "/tmp/code", "/tmp/code.14qnxy4t7ap9bmcs.rcgu."..., "-Wl,--gc-sections", "-pie", "-Wl,-zrelro", "-Wl,-znow", "-nodefaultlibs", "-L", ...], 0x55ff28d300e0 /* 7 vars */) = -1 ENOENT (No such file or directory)
34    execve("/usr/local/bin/cc", ["cc", "-Wl,--as-needed", "-Wl,-z,noexecstack", "-Wl,--eh-frame-hdr", "-m64", "-L", "/usr/lib/rustlib/x86_64-alpine-l"..., "/tmp/code.code.7rcbfp3g-cgu.0.rc"..., "/tmp/code.code.7rcbfp3g-cgu.1.rc"..., "/tmp/code.code.7rcbfp3g-cgu.10.r"..., "/tmp/code.code.7rcbfp3g-cgu.11.r"..., "/tmp/code.code.7rcbfp3g-cgu.12.r"..., "/tmp/code.code.7rcbfp3g-cgu.13.r"..., "/tmp/code.code.7rcbfp3g-cgu.14.r"..., "/tmp/code.code.7rcbfp3g-cgu.15.r"..., "/tmp/code.code.7rcbfp3g-cgu.2.rc"..., "/tmp/code.code.7rcbfp3g-cgu.3.rc"..., "/tmp/code.code.7rcbfp3g-cgu.4.rc"..., "/tmp/code.code.7rcbfp3g-cgu.5.rc"..., "/tmp/code.code.7rcbfp3g-cgu.6.rc"..., "/tmp/code.code.7rcbfp3g-cgu.7.rc"..., "/tmp/code.code.7rcbfp3g-cgu.8.rc"..., "/tmp/code.code.7rcbfp3g-cgu.9.rc"..., "-o", "/tmp/code", "/tmp/code.14qnxy4t7ap9bmcs.rcgu."..., "-Wl,--gc-sections", "-pie", "-Wl,-zrelro", "-Wl,-znow", "-nodefaultlibs", "-L", ...], 0x55ff28d300e0 /* 7 vars */) = -1 ENOENT (No such file or directory)
34    execve("/usr/sbin/cc", ["cc", "-Wl,--as-needed", "-Wl,-z,noexecstack", "-Wl,--eh-frame-hdr", "-m64", "-L", "/usr/lib/rustlib/x86_64-alpine-l"..., "/tmp/code.code.7rcbfp3g-cgu.0.rc"..., "/tmp/code.code.7rcbfp3g-cgu.1.rc"..., "/tmp/code.code.7rcbfp3g-cgu.10.r"..., "/tmp/code.code.7rcbfp3g-cgu.11.r"..., "/tmp/code.code.7rcbfp3g-cgu.12.r"..., "/tmp/code.code.7rcbfp3g-cgu.13.r"..., "/tmp/code.code.7rcbfp3g-cgu.14.r"..., "/tmp/code.code.7rcbfp3g-cgu.15.r"..., "/tmp/code.code.7rcbfp3g-cgu.2.rc"..., "/tmp/code.code.7rcbfp3g-cgu.3.rc"..., "/tmp/code.code.7rcbfp3g-cgu.4.rc"..., "/tmp/code.code.7rcbfp3g-cgu.5.rc"..., "/tmp/code.code.7rcbfp3g-cgu.6.rc"..., "/tmp/code.code.7rcbfp3g-cgu.7.rc"..., "/tmp/code.code.7rcbfp3g-cgu.8.rc"..., "/tmp/code.code.7rcbfp3g-cgu.9.rc"..., "-o", "/tmp/code", "/tmp/code.14qnxy4t7ap9bmcs.rcgu."..., "-Wl,--gc-sections", "-pie", "-Wl,-zrelro", "-Wl,-znow", "-nodefaultlibs", "-L", ...], 0x55ff28d300e0 /* 7 vars */) = -1 ENOENT (No such file or directory)
34    execve("/usr/bin/cc", ["cc", "-Wl,--as-needed", "-Wl,-z,noexecstack", "-Wl,--eh-frame-hdr", "-m64", "-L", "/usr/lib/rustlib/x86_64-alpine-l"..., "/tmp/code.code.7rcbfp3g-cgu.0.rc"..., "/tmp/code.code.7rcbfp3g-cgu.1.rc"..., "/tmp/code.code.7rcbfp3g-cgu.10.r"..., "/tmp/code.code.7rcbfp3g-cgu.11.r"..., "/tmp/code.code.7rcbfp3g-cgu.12.r"..., "/tmp/code.code.7rcbfp3g-cgu.13.r"..., "/tmp/code.code.7rcbfp3g-cgu.14.r"..., "/tmp/code.code.7rcbfp3g-cgu.15.r"..., "/tmp/code.code.7rcbfp3g-cgu.2.rc"..., "/tmp/code.code.7rcbfp3g-cgu.3.rc"..., "/tmp/code.code.7rcbfp3g-cgu.4.rc"..., "/tmp/code.code.7rcbfp3g-cgu.5.rc"..., "/tmp/code.code.7rcbfp3g-cgu.6.rc"..., "/tmp/code.code.7rcbfp3g-cgu.7.rc"..., "/tmp/code.code.7rcbfp3g-cgu.8.rc"..., "/tmp/code.code.7rcbfp3g-cgu.9.rc"..., "-o", "/tmp/code", "/tmp/code.14qnxy4t7ap9bmcs.rcgu."..., "-Wl,--gc-sections", "-pie", "-Wl,-zrelro", "-Wl,-znow", "-nodefaultlibs", "-L", ...], 0x55ff28d300e0 /* 7 vars */) = 0
35    execve("/usr/libexec/gcc/x86_64-alpine-linux-musl/9.3.0/collect2", ["/usr/libexec/gcc/x86_64-alpine-l"..., "-plugin", "/usr/libexec/gcc/x86_64-alpine-l"..., "-plugin-opt=/usr/libexec/gcc/x86"..., "-plugin-opt=-fresolution=/tmp/cc"..., "--eh-frame-hdr", "--hash-style=gnu", "-m", "elf_x86_64", "--as-needed", "-dynamic-linker", "/lib/ld-musl-x86_64.so.1", "-pie", "-z", "relro", "-z", "now", "-o", "/tmp/code", "/usr/lib/gcc/x86_64-alpine-linux"..., "/usr/lib/gcc/x86_64-alpine-linux"..., "/usr/lib/gcc/x86_64-alpine-linux"..., "-L/usr/lib/rustlib/x86_64-alpine"..., "-L/usr/lib/rustlib/x86_64-alpine"..., "-L/usr/lib/gcc/x86_64-alpine-lin"..., "-L/usr/lib/gcc/x86_64-alpine-lin"..., "-L/usr/lib/gcc/x86_64-alpine-lin"..., "-L/lib/../lib", "-L/usr/lib/../lib", "-L/usr/lib/gcc/x86_64-alpine-lin"..., "-L/usr/lib/gcc/x86_64-alpine-lin"..., "--as-needed", ...], 0x19932e0 /* 12 vars */) = 0
36    execve("/usr/lib/gcc/x86_64-alpine-linux-musl/9.3.0/../../../../x86_64-alpine-linux-musl/bin/ld", ["/usr/lib/gcc/x86_64-alpine-linux"..., "-plugin", "/usr/libexec/gcc/x86_64-alpine-l"..., "-plugin-opt=/usr/libexec/gcc/x86"..., "-plugin-opt=-fresolution=/tmp/cc"..., "--eh-frame-hdr", "--hash-style=gnu", "-m", "elf_x86_64", "--as-needed", "-dynamic-linker", "/lib/ld-musl-x86_64.so.1", "-pie", "-z", "relro", "-z", "now", "-o", "/tmp/code", "/usr/lib/gcc/x86_64-alpine-linux"..., "/usr/lib/gcc/x86_64-alpine-linux"..., "/usr/lib/gcc/x86_64-alpine-linux"..., "-L/usr/lib/rustlib/x86_64-alpine"..., "-L/usr/lib/rustlib/x86_64-alpine"..., "-L/usr/lib/gcc/x86_64-alpine-lin"..., "-L/usr/lib/gcc/x86_64-alpine-lin"..., "-L/usr/lib/gcc/x86_64-alpine-lin"..., "-L/lib/../lib", "-L/usr/lib/../lib", "-L/usr/lib/gcc/x86_64-alpine-lin"..., "-L/usr/lib/gcc/x86_64-alpine-lin"..., "--as-needed", ...], 0x7ffec32fdea8 /* 12 vars */) = 0
36    +++ exited with 0 +++
35    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=36, si_uid=0, si_status=0, si_utime=6, si_stime=15} ---
35    +++ exited with 0 +++
34    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=35, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
34    +++ exited with 0 +++
14    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=34, si_uid=0, si_status=0, si_utime=0, si_stime=1} ---
14    +++ 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=11, si_stime=5} ---
37    execve("/bin/cat", ["cat", "-"], 0x5557a6836d08 /* 7 vars */) = 0
38    execve("/tmp/code", ["/tmp/code"], 0x5557a6836cf0 /* 7 vars */) = 0
37    +++ exited with 0 +++
10    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=37, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
38    +++ exited with 101 +++
10    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=38, si_uid=0, si_status=101, si_utime=0, si_stime=0} ---
39    execve("/bin/rm", ["rm", "/tmp/code.rs", "/tmp/code"], 0x5557a6836cf0 /* 7 vars */) = 0
39    +++ exited with 0 +++
10    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=39, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
10    +++ exited with 0 +++