Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
40081 | wuxinyue | 均值 | C++ | Accepted | 0 MS | 248 KB | 230 | 2024-02-07 13:38:58 |
#include <bits/stdc++.h> using namespace std; int main(){ double n; cin>>n; int i=1; double sum = 0; while(i<=n){ double x; cin>>x; sum=sum+x; i++; } cout<<fixed<<setprecision(4)<<sum/n; return 0; }