题解 | #小乐乐算多少人被请家长#
小乐乐算多少人被请家长
http://www.nowcoder.com/practice/1654083e09d2432aa24b151d36309155
#include<stdio.h>
int main() {
int n, count = 0;
scanf("%d", &n);
int a[n], b[n], c[n];
for (int i = 0; i < n; i++) {
scanf("%d %d %d\n", &a[i], &b[i], &c[i]);
if ((a[i] + b[i] + c[i]) / 3 < 60)
count++;
}
printf("%d", count);
return 0;
}
int main() {
int n, count = 0;
scanf("%d", &n);
int a[n], b[n], c[n];
for (int i = 0; i < n; i++) {
scanf("%d %d %d\n", &a[i], &b[i], &c[i]);
if ((a[i] + b[i] + c[i]) / 3 < 60)
count++;
}
printf("%d", count);
return 0;
}