結果

問題 No.9010 うるう年判定
ユーザー kokatsu
提出日時 2023-04-04 23:21:58
言語 Rust
(1.83.0 + proconio)
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 326 bytes
コンパイル時間 11,369 ms
コンパイル使用メモリ 379,092 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-01 13:19:14
合計ジャッジ時間 12,513 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

fn main() {
    let mut s: String = String::new();
    std::io::stdin().read_line(&mut s).ok();

    let n: i64 = s.trim().parse().unwrap();

    let s: &str = match n {
        n if n % 400 == 0 => "Yes",
        n if n % 100 == 0 => "No",
        n if n % 4 == 0 => "Yes",
        _ => "No",
    };

    println!("{}", s);
}
0