求助!!

P5726 【深基4.习9】打分

咋做啊?
by chht_0219 @ 2023-12-19 14:07:19


你的思路和第二篇题解差不多,可以参考一下第二篇题解的做法。
by XuYu0317 @ 2023-12-19 14:21:50


``` #include<bits/stdc++.h> using namespace std; int main(){ int x,minn=100,maxn=0; double s; cin>>x; int a[x]; for(int i=1;i<=x;i++){ cin>>a[i]; if(a[i]>maxn){ maxn=a[i]; } if(a[i]<minn) minn=a[i]; s=s+a[i]; } cout<<fixed<<setprecision(2)<<(s-minn-maxn)/(x-2); return 0; } ``` 是这样吗?
by chht_0219 @ 2023-12-22 13:14:44


此帖完
by chht_0219 @ 2023-12-22 13:26:55


互关一下
by chht_0219 @ 2023-12-22 13:27:56


|