結果

問題 No.9002 FizzBuzz(テスト用)
ユーザー O20LQ7O20LQ7
提出日時 2021-11-11 10:36:27
言語 Rust
(1.77.0)
結果
AC  
実行時間 1 ms / 5,000 ms
コード長 408 bytes
コンパイル時間 11,060 ms
コンパイル使用メモリ 377,140 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-05-02 02:19:39
合計ジャッジ時間 11,703 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 0 ms
5,248 KB
testcase_01 AC 1 ms
5,248 KB
testcase_02 AC 1 ms
5,376 KB
testcase_03 AC 1 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

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