Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
39533 | Hyma | 求平均年龄 | C++ | Accepted | 0 MS | 252 KB | 228 | 2024-02-02 12:32:29 |
#include <iostream> using namespace std; int main() { int n; cin >>n; double sum=0; double age; for(int i=0;i<n;i++){ cin>>age; sum+=age; } printf("%.2f",sum/n); return 1; }