2 条题解
-
-5
#include<iostream> #include<iomanip> using namespace std; int main(){ int n; cin>>n; int x, s=0; // x评分,s总分 int mx=0,mn=10; // 最高分,最低分 for(int i=1; i<=n; i++){ cin>>x; s += x; if(mx < x) mx=x; // 更新最大值 if(mn > x) mn=x; // 更新最小值 } cout<<fixed<<setprecision(2)<<1.0*(s - mx - mn)/(n-2); return 0; }
- 1
信息
- ID
- 31
- 时间
- 1000ms
- 内存
- 512MiB
- 难度
- 5
- 标签
- 递交数
- 96
- 已通过
- 37
- 上传者