题解 | #小乐乐算多少人被请家长#

小乐乐算多少人被请家长

http://www.nowcoder.com/practice/1654083e09d2432aa24b151d36309155

import java.util.Scanner;

/**
 * @author zmstart
 * @create 2022-03-20 18:43
 */
public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);

        int n = scan.nextInt();
        int[] score = new int[3 * n];

        int count = 0;
        for (int j = 0; j < n; j++) {
            int sum = 0;
            for (int i = 0; i < 3 ; i++) {
                score[i] = scan.nextInt();
                sum += score[i];
            }
            if (sum/3 < 60){
                count++;
            }
        }
        System.out.println(count);

    }
}
全部评论

相关推荐

07-22 11:07
门头沟学院 Java
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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