結果

問題 No.3112 Decrement or Mod Game
コンテスト
ユーザー かえる☔
提出日時 2025-04-20 17:12:02
言語 Rust
(1.94.0 + proconio + num + itertools)
コンパイル:
/usr/bin/rustc_custom
実行:
./target/release/main
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 380 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 4,109 ms
コンパイル使用メモリ 177,912 KB
実行使用メモリ 7,336 KB
最終ジャッジ日時 2026-07-10 02:44:29
合計ジャッジ時間 7,114 ms
ジャッジサーバーID
(参考情報)
judge3_1 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 65
権限があれば一括ダウンロードができます
コンパイルメッセージ
warning: unused imports: `marker::Chars as chars` and `marker::Usize1 as usize1`
 --> src/main.rs:1:23
  |
1 | use proconio::{input, marker::Usize1 as usize1, marker::Chars as chars};
  |                       ^^^^^^^^^^^^^^^^^^^^^^^^  ^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default

warning: variable `A` should have a snake case name
 --> src/main.rs:5:9
  |
5 |         A: usize, B: usize,
  |         ^ help: convert the identifier to snake case: `a`
  |
  = note: `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default

warning: variable `B` should have a snake case name
 --> src/main.rs:5:19
  |
5 |         A: usize, B: usize,
  |                   ^ help: convert the identifier to snake case: `b`

ソースコード

diff #
raw source code

use proconio::{input, marker::Usize1 as usize1, marker::Chars as chars};

fn main() {
    input! {
        A: usize, B: usize,
    }

    let alice = {
        if A == 1 {true}
        else if A == 2 {A>=B}
        else {
            if B==A-1 {false}
            else if A>=B {true}
            else {false}
        }
    };
    println!("{}", if alice {"Alice"} else {"Bob"});
}
0