結果

問題 No.2647 [Cherry 6th Tune A] Wind
ユーザー phsplsphspls
提出日時 2024-02-23 21:34:02
言語 Rust
(1.77.0)
結果
WA  
実行時間 -
コード長 745 bytes
コンパイル時間 2,208 ms
コンパイル使用メモリ 192,324 KB
実行使用メモリ 6,548 KB
最終ジャッジ日時 2024-02-23 21:34:06
合計ジャッジ時間 2,914 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
6,548 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 2 ms
6,548 KB
testcase_04 AC 1 ms
6,548 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 2 ms
6,548 KB
testcase_08 AC 2 ms
6,548 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 1 ms
6,548 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
warning: unused variable: `d`
  --> Main.rs:10:13
   |
10 |         let d = temp[0];
   |             ^ help: if this is intentional, prefix it with an underscore: `_d`
   |
   = note: `#[warn(unused_variables)]` on by default

warning: 1 warning emitted

ソースコード

diff #

fn main() {
    let mut t = String::new();
    std::io::stdin().read_line(&mut t).ok();
    let t: usize = t.trim().parse().unwrap();
    for _ in 0..t {
        let mut temp = String::new();
        std::io::stdin().read_line(&mut temp).ok();
        let temp: Vec<usize> = temp.trim().split_whitespace().map(|s| s.parse().unwrap()).collect();
        let d = temp[0];
        let a = temp[1];
        let mut x = String::new();
        std::io::stdin().read_line(&mut x).ok();
        let x: Vec<usize> = x.trim().split_whitespace().map(|s| s.parse().unwrap()).collect();
        let ret = x.into_iter().map(|v| (v as f64 / a as f64).round() as usize).map(|v| v.to_string()).collect::<Vec<_>>();
        println!("{}", ret.join(" "));
    }
}
0