Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
444068 admin_rjp 【C4-1】找找谁的身高超过全家的平均身高 C++ 通过 100 1 MS 252 KB 377 2026-06-10 17:31:37

Tests(3/3):


#include<iostream> #include<iomanip> using namespace std; int main(){ int n,a[15],s=0; cin>>n; double ave; for(int i=1; i<=n; i++){ cin>>a[i]; } for(int i=1; i<=n; i++){ s=s+a[i]; } ave=1.0*s/n; cout<<"AVE="; cout<<fixed<<setprecision(1)<<ave<<endl; for(int i=1; i<=n; i++){ if(a[i]>ave){ cout<<i<<':'<<a[i]<<' '; } } return 0; }


测评信息: