結果

問題 No.9002 FizzBuzz(テスト用)
ユーザー かわなか
提出日時 2016-01-05 20:04:12
言語 Rust
(1.83.0 + proconio)
結果
AC  
実行時間 1 ms / 5,000 ms
コード長 362 bytes
コンパイル時間 12,905 ms
コンパイル使用メモリ 379,300 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-09-19 11:29:28
合計ジャッジ時間 11,382 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 4
権限があれば一括ダウンロードができます
コンパイルメッセージ
warning: use of deprecated method `core::str::<impl str>::trim_right`: superseded by `trim_end`
 --> src/main.rs:6:29
  |
6 |     let t = i32::from_str(r.trim_right()).unwrap();
  |                             ^^^^^^^^^^
  |
  = note: `#[warn(deprecated)]` on by default
help: replace the use of the deprecated method
  |
6 |     let t = i32::from_str(r.trim_end()).unwrap();
  |                             ~~~~~~~~

ソースコード

diff #

use std::io::stdin;
use std::str::FromStr;
fn main(){
    let mut r = String::new(); 
    stdin().read_line(&mut r).unwrap();
    let t = i32::from_str(r.trim_right()).unwrap();
    for x in 1..t+1 {
        println!("{}",(if x%3==0&&x%5==0{"FizzBuzz".to_string()}else if x%3==0{"Fizz".to_string()}else if x%5==0{"Buzz".to_string()}else{x.to_string()}));
    }
}
0