import java.util.Scanner; /** * Created by fishsey on 2017/8/31. */ public class Main { public static void main(String args[]) { Scanner cin = new Scanner(System.in); int n,temp; while (cin.hasNext()) { n = Integer.parseInt(cin.nextLine()); int maxNum=0, sums=0; while (n-- > 0) { temp = cin.nextInt(); sums += temp; maxNum = Math.max(maxNum, temp); } cin.nextLine(); if (sums >= maxNum*2) System.out.println("Yes"); else System.out.println("No"); } } } 第二题0%,楼主看看哪里有问题???