Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
46717 | zouqinghua | 求整数的和与均值 | C++ | Accepted | 0 MS | 256 KB | 226 | 2024-05-05 09:56:08 |
#include<bits/stdc++.h> using namespace std; int n,m,i,t; double s=0; int main() { scanf("%d",&n); for(i=1;i<=n;i++) { scanf("%d",&m); s=s+m; } t=s; printf("%d",t); printf(" %.5lf",s/n); return 0; }