import java.util.Arrays;
import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while(sc.hasNext()){
int n = sc.nextInt();
if (n==0) {
break;
}
int vote[] = new int[n];
for (int i = 0; i < vote.length; i++) {
vote[i] = sc.nextInt();
}
Arrays.sort(vote);
int ans = 0;
for (int i = 0; i < vote.length/2+1; i++) {
ans += vote[i]/2+1;
}
System.out.println(ans);
}
sc.close();
}
}
HDOJ 2535 Vote(水题)
最新推荐文章于 2019-07-28 19:07:32 发布