QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#627566 | #8242. V-Diagram | taijinvjin# | WA | 0ms | 3756kb | C++17 | 465b | 2024-10-10 16:20:28 | 2024-10-10 16:20:29 |
Judging History
answer
#include <bits/stdc++.h>
void solve() {
int n;
std::cin >> n;
std::vector<int> a(n + 1);
long double Max = 0, Ans = 0;
for (int i = 1; i <= n; i ++) {
std::cin >> a[i];
Max += a[i];
}
Ans = Max / n;
std::cout << Ans << "\n";
}
signed main() {
std::ios::sync_with_stdio(false);
std::cin.tie(nullptr);
int T = 1;
std::cin >> T;
while (T --) {
solve();
}
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3756kb
input:
2 4 8 2 7 10 6 9 6 5 3 4 8
output:
6.75 5.83333
result:
wrong answer 2nd numbers differ - expected: '5.8333333', found: '5.8333300', error = '0.0000006'