結果

問題 No.1738 What's in the box?
ユーザー ktr216
提出日時 2021-11-12 22:01:11
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
RE  
実行時間 -
コード長 381 bytes
コンパイル時間 1,366 ms
コンパイル使用メモリ 168,136 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-25 18:30:22
合計ジャッジ時間 3,257 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 68 RE * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define rep(i, l, r) for (int i = (l); i < (r); i++)
using namespace std;

typedef long long ll;

int main() {
    ll N, M, S = 0;
    cin >> N >> M;
    vector<ll> W(N);
    rep(i, 0, N) {
        cin >> W[i];
        S += W[i];
    }
    rep(i, 0, N) {
        cout << M * W[i] / S;
        if (i == N - 1) cout << endl;
        else cout << " ";
    }
}
0