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%,楼主看看哪里有问题???
点赞 评论

相关推荐

04-13 18:10
门头沟学院 Java
想熬夜的小飞象在秋招:被腾讯挂了后爸妈以为我失联了
点赞 评论 收藏
分享
牛客网
牛客企业服务