题解 | #小乐乐算多少人被请家长#
小乐乐算多少人被请家长
https://www.nowcoder.com/practice/1654083e09d2432aa24b151d36309155
#include <stdio.h> int main() { // 记录班级的人数 int n = 0; // 三科的成绩 int math_score = 0; int chin_score = 0; int eng_score = 0; // 记录请家长的人数 int count = 0; while (~scanf("%d", &n)) { for (int i = 1; i <= n; i++) { scanf("%d %d %d", &math_score, &eng_score, &chin_score); if ((math_score + eng_score + chin_score) / 3 < 60) { count++; } } } printf("%d\n", count); return 0; }