結果

問題 No.9002 FizzBuzz(テスト用)
ユーザー O20LQ7
提出日時 2021-11-11 10:36:27
言語 Rust
(1.83.0 + proconio)
結果
AC  
実行時間 1 ms / 5,000 ms
コード長 408 bytes
コンパイル時間 12,468 ms
コンパイル使用メモリ 378,872 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-22 11:53:52
合計ジャッジ時間 12,655 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

fn main() {
    let mut num_s = String::new();
    std::io::stdin().read_line(&mut num_s).ok();
    let a: i32 = num_s.trim().parse().unwrap();

    let mut n: i32 = 1;
    while n <= a {
        match n % 15 {
            0 => println!("FizzBuzz"),
            3 | 6 | 9 | 12 => println!("Fizz"),
            5 | 10 => println!("Buzz"),
            _ => println!("{}", n),
        }
        n += 1;
    }
}
0