#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
int cmp(const int a, const int b)
{
return a < b;
}
int main()
{
int n;
int a[10001];
while (scanf("%d", &n) != EOF)
{
memset(a, 0, sizeof(a));
for (int i = 0; i < n; i++)
{
scanf("%d", &a[i]);
}
sort(a, a + n, cmp);
cout << a[n / 2] << endl;
}
return 0;
}
//输入时 注意多组输入即可
1157 Who's in the Middle
猜你喜欢
转载自blog.csdn.net/CJAVA__/article/details/81148085
今日推荐
周排行