题解 | #小乐乐算最高分#

小乐乐算最高分

http://www.nowcoder.com/practice/57c71982296b45b281838c2a40283c19

import java.util.Scanner;
public class Main {
    
    public  static void main(String[] args) {
        
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int max = 0 ;
        while(sc.hasNextInt()) {
            int score = sc.nextInt();
            if(max < score) {
                max = score;
            }
        }
        System.out.println(max);
    }
}
全部评论

相关推荐

评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务