青年歌手大奖赛_评委会打分
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 30947 Accepted Submission(s): 14964
3 99 98 97 4 100 99 98 97
98.00 98.50
#include <iostream>
using namespace std;
int main(){
int m,n,i;
while(cin>>m)
{
int max = 0, min = 100;
double s = 0;
for (i = 0; i < m; i ++)
{
cin>>n;
if(max < n)
max = n;
if(min > n)
min = n;
s += n;
}
cout.setf(ios::fixed);
cout.precision(2);
cout<<(s-max-min)/(m-2)<<endl;
}
return 0;
}
214




被折叠的 条评论
为什么被折叠?



