結果

問題 No.882 約数倍数
コンテスト
ユーザー elphe
提出日時 2026-01-31 16:58:13
言語 Rust
(1.92.0 + proconio + num + itertools)
結果
AC  
実行時間 1 ms / 500 ms
コード長 450 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 722 ms
コンパイル使用メモリ 194,844 KB
実行使用メモリ 7,972 KB
最終ジャッジ日時 2026-01-31 16:58:15
合計ジャッジ時間 1,971 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

fn main() {
    let stdin = std::io::read_to_string(std::io::stdin()).unwrap();
    let mut stdin = stdin.split_ascii_whitespace();

    let a: u8 = stdin.next().unwrap().parse().unwrap();
    let b: u8 = stdin.next().unwrap().parse().unwrap();

    println!("{}", output(solve(a, b)));
}

fn solve(a: u8, b: u8) -> bool {
    a % b == 0
}

fn output(ans: bool) -> &'static str {
    match ans {
        true => "YES",
        false => "NO",
    }
}
0