結果

問題 No.2647 [Cherry 6th Tune A] Wind
ユーザー parukiparuki
提出日時 2024-03-02 23:07:27
言語 JavaScript
(node v21.7.1)
結果
WA  
実行時間 -
コード長 622 bytes
コンパイル時間 160 ms
コンパイル使用メモリ 6,676 KB
実行使用メモリ 44,856 KB
最終ジャッジ日時 2024-03-02 23:07:29
合計ジャッジ時間 2,504 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
37,632 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 95 ms
43,444 KB
testcase_04 AC 74 ms
38,400 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 90 ms
43,468 KB
testcase_08 AC 90 ms
43,620 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 67 ms
37,632 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

Main(require("fs").readFileSync("/dev/stdin", "utf8"));

function Main(input) {
    const lines = input.split("\n");
    const T = parseInt(lines[0]);
    for(let i=0; i<T; i++) {
        const DA = lines[1+i*2].split(" ").map(Number);
        const D = DA[0];
        const A = DA[1];
        const X = lines[1+i*2+1].split(" ").map(Number);
        let answer = "";
        for(let i=0; i<D; ++i) {
            let y = Math.floor(X[i]/A);
            let r = X[i] % A;
            if(r*2 >= A) {
                y++;
            }
            answer += y + (i==D-1?"":" ");
        }
        console.log(answer);
    }
}
0