Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
48940 | fuhaoze | 均值 | C++ | Accepted | 0 MS | 256 KB | 218 | 2024-06-15 13:48:14 |
#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; }