Editorial for Оценки
Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.
Submitting an official solution before solving the problem yourself is a bannable offence.
by:
mayaSubmitting an official solution before solving the problem yourself is a bannable offence.
Тестовете можете да видите тук.
Примерно решение на C++:
#include<iostream>
#include<cstdio>
using namespace std;
int main()
{
double m=0,m1=10000000000,n,n1,i,sum=0,sum1,sum2;
cin>>n;
for(i=1; i<=n; i++)
{
cin>>n1;
sum=sum+n1;
m=max(m,n1);
m1=min(m1,n1);
}
sum1=sum-(m1+m);
sum2=sum1/(n-2);
printf ("%.0lf\n",sum2);
return 0;
}
Comments