結果

問題 No.9002 FizzBuzz(テスト用)
ユーザー Yusuke Wada
提出日時 2020-07-09 16:07:34
言語 Rust
(1.83.0 + proconio)
結果
WA  
実行時間 -
コード長 525 bytes
コンパイル時間 13,350 ms
コンパイル使用メモリ 405,036 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-10-07 14:07:42
合計ジャッジ時間 14,382 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 1 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

fn getline() -> String {
    let mut __ret = String::new();
    std::io::stdin().read_line(&mut __ret).ok();
    return __ret;
}

fn main() {
    let s = getline();
    let a: Vec<_> = s.trim().split(' ').collect();
    let x: i32 = a[0].parse().unwrap();

    for n in 1..=x {
        if n % 15 == 0 {
            println!("fizzbuzz");
        } else if n % 3 == 0 {
            println!("fizz");
        } else if n % 5 == 0 {
            println!("buzz");
        } else {
            println!("{}", n);
        }
    }
}
0