結果

問題 No.2647 [Cherry 6th Tune A] Wind
ユーザー nhtloc
提出日時 2025-06-08 01:36:54
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 648 bytes
コンパイル時間 924 ms
コンパイル使用メモリ 84,392 KB
実行使用メモリ 7,848 KB
最終ジャッジ日時 2025-06-08 01:36:57
合計ジャッジ時間 2,491 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 6 WA * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <cmath> // cho hàm round
using namespace std;

int main() {
    int T;
    cin >> T;
    while (T--) {
        int D;
        long long A;
        cin >> D >> A;
        vector<long long> X(D);
        for (int i = 0; i < D; ++i) {
            cin >> X[i];
        }
        for (int i = 0; i < D; ++i) {
            // Tính làm tròn: round(X[i] * 1.0 / A)
            // Ép về long long sau khi làm tròn
            long long result = (long long)round((double)X[i] / A);
            cout << result;
            if (i < D-1) cout << " ";
        }
        cout << endl;
    }
    return 0;
}
0