Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
354511 胡珂 【C2-6】求平均值 C++ 通过 100 1 MS 248 KB 219 2025-10-03 13:28:36

Tests(1/1):


#include <bits/stdc++.h> using namespace std; int main(){ int n; double sum=0.0,a[186]; cin>>n; for(int i=1;i<=n;i++){ cin>>a[i]; sum+=a[i]*1.0; }cout<<fixed<<setprecision(1)<<sum/n*1.0; return 0; }


测评信息: