Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
47031 | zhangyanshuo | 均值 | C++ | Accepted | 1 MS | 244 KB | 218 | 2024-05-11 18:16:38 |
#include<bits/stdc++.h> using namespace std; int main() { int n; double a; int i=1; double j=0; cin>>n; while(n>=i) { cin>>a; j+=a; i++; } cout<<fixed<<setprecision(4)<<j/n; return 0; }