結果
| 問題 |
No.1738 What's in the box?
|
| コンテスト | |
| ユーザー |
hiro71687k
|
| 提出日時 | 2023-08-29 13:08:14 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 561 bytes |
| コンパイル時間 | 4,348 ms |
| コンパイル使用メモリ | 251,448 KB |
| 最終ジャッジ日時 | 2025-02-16 15:32:21 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge6 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 61 WA * 9 |
ソースコード
#include <bits/stdc++.h>
#include <atcoder/all>
using namespace atcoder;
using namespace std;
using ll=long long;
using ld=long double;
ld pie=3.141592653589793;
ll mod=998244353;
ll inf=1009999999999999990;
int main(){
ll n,m;
cin >> n >> m;
vector<ll>w(n);
ld sum=0;
for (ll i = 0; i < n; i++)
{
cin >> w[i];
sum+=w[i];
}
sum/=(ld)m;
vector<ll>x(n);
for (ll i = 0; i < n; i++)
{
x[i]=w[i]/sum;
}
for (ll i = 0; i < n; i++)
{
cout << x[i] << ' ';
}
cout << endl;
}
hiro71687k