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