| Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|
| 20820 | LeoWang | 求平均年龄 | C++ | Accepted | 0 MS | 244 KB | 222 | 2023-06-21 06:35:58 |
#include<bits/stdc++.h> using namespace std; int main(){ int n,a; int b=0; cin>>n; for(int i=0;i<n;i++){ cin>>a; b+=a; } double aver=1.0*b/n; cout << fixed << setprecision(2) << aver; return 0; }