Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
56756 | 许兴平 | 均值 | C++ | Accepted | 0 MS | 244 KB | 256 | 2024-11-15 19:24:03 |
#include<bits/stdc++.h> using namespace std; int main(){ int times,cishu; double result=0.0,a; cin>>times; cishu=times; while(times>=1){ cin>>a; result+=a; times-=1; } cout<<fixed<<setprecision(4)<<1.0*result/cishu; return 0; }