Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
45909 | zouqinghua | 求平均年龄 | C++ | Accepted | 0 MS | 244 KB | 210 | 2024-04-20 20:21:28 |
#include<bits/stdc++.h> using namespace std; int main() { int n,t; int i=1; double s; s=0; cin>>n; while(i<=n) { cin>>t; s+=t; i++; } printf("%.2lf",s/n); return 0; }