5 条题解
-
-2
#include <bits/stdc++.h> using namespace std;
int main() { int n,x=0; int a[105]; while (1) { cin>>n; if(n==0) break;
for (int i = 0; i < n; i++) { cin >> a[i]; } sort(a, a + n); int v = n / 2 + 1; int x = 0; for (int j = 0; j <=n/2; j++) { x = x + (a[j] /2+ 1); } cout << x << endl; } return 0;}
信息
- ID
- 361
- 时间
- 1000ms
- 内存
- 64MiB
- 难度
- 7
- 标签
- 递交数
- 133
- 已通过
- 28
- 上传者