結果

問題 No.188 HAPPY DAY
ユーザー natu7925s
提出日時 2025-06-12 15:43:30
言語 Rust
(1.83.0 + proconio)
結果
AC  
実行時間 1 ms / 1,000 ms
コード長 377 bytes
コンパイル時間 14,267 ms
コンパイル使用メモリ 397,744 KB
実行使用メモリ 6,272 KB
最終ジャッジ日時 2025-06-12 15:43:53
合計ジャッジ時間 15,157 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

fn main() {
    let max_day = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];

    let mut count = 0;
    for n in 1..=12 {
        for d in 1..=max_day[n - 1] {
            let day_split_1 =  d / 10;
            let day_split_2 = d % 10;
            if n == (day_split_1 + day_split_2) {
                count += 1;
            }
        }
    }
    println!("{}", count);
}
0