QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#627566#8242. V-Diagramtaijinvjin#WA 0ms3756kbC++17465b2024-10-10 16:20:282024-10-10 16:20:29

Judging History

你现在查看的是最新测评结果

  • [2024-10-10 16:20:29]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3756kb
  • [2024-10-10 16:20:28]
  • 提交

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'