Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
103152 | 糜宗易 | 计算平均数 | C++ | Wrong Answer | 1 MS | 276 KB | 269 | 2024-12-28 12:17:23 |
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; int a[n]; for(int i=0;i<=n-1;i++){ cin>>a[i]; } int s=0; for(int i=0;i<=n-1;i++){ s=s+a[i]; } float sum; printf("%.2f\n",sum=s/5); return 0; }
------Input------
679 849 98 256 256
------Answer-----
427.60 679 849
------Your output-----
331334784.00