結果

問題 No.1738 What's in the box?
ユーザー 👑 CleyL
提出日時 2022-01-18 00:14:40
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
RE  
実行時間 -
コード長 350 bytes
コンパイル時間 930 ms
コンパイル使用メモリ 68,768 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-23 13:03:19
合計ジャッジ時間 2,991 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 68 RE * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
using namespace std;
int main(){
    long long n,k;cin>>n>>k;
    vector<long long> A(n);
    long long sm  = 0;
    for(int i = 0; n > i; i++){
        cin>>A[i];
        sm += A[i];
    }
    for(int i = 0; n > i; i++){
        cout << k*A[i]/sm;
        if(i+1 != n)cout << " ";
    }
    cout << endl;
    
}
0