Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
2301 | 孙浚轩 | 18统计成绩 | C++ | Compile Error | 0 MS | 0 KB | 369 | 2023-12-23 17:22:23 |
#include<iostream> #include<iomanip> using namespace std; int main(){ int n,mx=INT_MIN,mn=INT_MAX; double sc,s=0; cin>>n; for(int i=n;i>0;i--){ cin>>sc; s+=sc; if(sc>mx) mx=sc; if(sc<mn) mn=sc; } cout<<s<<" "<<fixed<<setprecision(2)<<s/n<<" "<<mx<<" "<<mn; return 0; }
Main.cc: In function 'int main()': Main.cc:5:14: error: 'INT_MIN' was not declared in this scope int n,mx=INT_MIN,mn=INT_MAX; ^ Main.cc:13:15: error: 'mn' was not declared in this scope if(sc<mn) ^ Main.cc:16:62: error: 'mn' was not declared in this scope cout<<s<<" "<<fixed<<setprecision(2)<<s/n<<" "<<mx<<" "<<mn; ^