結果
問題 | No.9002 FizzBuzz(テスト用) |
ユーザー | mottodora |
提出日時 | 2016-10-14 21:33:54 |
言語 | Rust (1.77.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 485 bytes |
コンパイル時間 | 23,612 ms |
コンパイル使用メモリ | 401,132 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-05-01 23:06:10 |
合計ジャッジ時間 | 16,014 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 0 ms
5,248 KB |
testcase_01 | WA | - |
testcase_02 | WA | - |
testcase_03 | WA | - |
ソースコード
fn getline() -> String { let mut ret = String::new(); std::io::stdin().read_line(&mut ret).ok(); return ret; } fn fizzbuzz(n: i32) -> String { match (n % 3, n % 5) { (0, 0) => "fizzbuzz".to_string(), (_, 0) => "buzz".to_string(), (0, _) => "fizz".to_string(), _ => n.to_string() } } fn main() { let s = getline(); let x:i32 = s.trim().parse().unwrap(); for i in 1..x+1 { println!("{}", fizzbuzz(i)) } }