結果
問題 |
No.1738 What's in the box?
|
ユーザー |
![]() |
提出日時 | 2023-04-01 18:48:39 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 376 bytes |
コンパイル時間 | 736 ms |
コンパイル使用メモリ | 69,564 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-09-24 11:12:17 |
合計ジャッジ時間 | 3,010 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 68 RE * 2 |
ソースコード
#include<iostream> #include<vector> #define ll long long using namespace std; int main() { ll n, m; cin >> n >> m; vector<ll> w(n); ll sum = 0; for (int i = 0; i < n; i++) { cin >> w[i]; sum += w[i]; } for (int i = 0; i < n; i++) { if (i) cout << " "; cout << w[i] * m / sum; } cout << endl; return 0; }