#include <bits/stdc++.h> using namespace std; int main(){ int s=-100001,j=100001,n,m; double d=0,i,h; cin>>n; for(int i=1;i<=n;i++){ cin>>m; if(m>=s){ s=m; } if(m<=j){ j=m; } d=d+m; } h=d-s-j; n=n-2; d=h/n; printf("%.2lf",d ); return 0; }

0 comments

No comments so far...

Information

ID
658
Time
1000ms
Memory
256MiB
Difficulty
5
Tags
(None)
# Submissions
448
Accepted
163
Uploaded By