Submission
Status:
---------P
Subtask/Task Score:
10/100
Score: 10
User: nongkun4444
Problemset: KhaPhisadan
Language: cpp
Time: 0.005 second
Submitted On: 2025-12-28 20:14:25
/******************************************************************************
Welcome to GDB Online.
GDB online is an online compiler and debugger tool for C, C++, Python, PHP, Ruby,
C#, OCaml, VB, Perl, Swift, Prolog, Javascript, Pascal, COBOL, HTML, CSS, JS
Code, Compile, Run and Debug online from anywhere in world.
*******************************************************************************/
#include<bits/stdc++.h>
using namespace std;
int main(){
int N;
cin>>N;
int x;
int a = 0;
int min = 1000,max = 0;
for(int i=0;i<N;i++){
cin>> x;
a += x;
if(x > max) max = x;
if(x < min) min = x;
}
int m = a/N;
int v = min + max + m;
cout<<v;
}