結果
問題 |
No.1738 What's in the box?
|
ユーザー |
![]() |
提出日時 | 2021-11-12 21:41:19 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 474 bytes |
コンパイル時間 | 1,965 ms |
コンパイル使用メモリ | 168,200 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-11-25 17:36:57 |
合計ジャッジ時間 | 3,554 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | AC * 2 WA * 66 RE * 2 |
ソースコード
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (ll i = 0; i < n; i++) #define all(x) (x).begin(),(x).end() const long long INF = 1LL << 60; using ll = long long; using ld = long double; #define v2d(type,H,W,name,value) vector<vector<type>> name(H,vector<type>(W,value)); int main() { ll N,M; cin >> N >> M; vector<ll> a(N); rep(i,N){ cin >> a[i]; } ll sum=0; rep(i,N) sum+=a[i]; rep(i,N){ cout << (a[i]*M)/sum << endl; } }