Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
129617 | 古浩圳bylz | 计算平均分 | C++ | 通过 | 100 | 0 MS | 248 KB | 282 | 2024-01-27 09:10:12 |
#include<iostream> #include<cstdio> using namespace std; int main(){ double b=0; int n,i=0; cin>>n; int a[n]={0}; while(i<=n-1){ cin>>a[i]; i++; } i=0; while(i<=n){ if(i==n){ break; } b=b+a[i]; i++; } printf("%.2f",b/n); return 0; }