Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
48939 | fuhaoze | 求平均年龄 | C++ | Accepted | 0 MS | 260 KB | 210 | 2024-06-15 13:47:30 |
#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; }