QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#691867 | #5304. Money Game | the_fool# | WA | 0ms | 3904kb | C++20 | 902b | 2024-10-31 13:17:03 | 2024-10-31 13:17:04 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
using LL = long long;
using ll = long long;
using LD = long double;
signed main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n;
cin >> n;
// vector<LD> a(n);
// for (int i = 0; i < n; i++) {
// cin >> a[i];
// }
// for (int t = 1; t <= 100; t++) {
// for (int i = 0; i < n; i++) {
// a[i] /= 2;
// a[(i + 1) % n] += a[i];
// }
// for (int i = 0; i < n; i++) {
// cout << a[i] << " \n"[i == n - 1];
// }
// }
LD s = 0;
for (int i = 1; i <= n; i++) {
int x;
cin >> x;
s += x;
}
cout << fixed << setprecision(20);
s /= (n + 1);
cout << 2 * s << " ";
for (int i = 1; i < n - 1; i++) {
cout << s << " ";
}
cout << "\n";
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3904kb
input:
2 4 2
output:
4.00000000000000000000
result:
wrong output format Unexpected end of file - double expected