Saturday, May 21, 2016

CF 231A

#include<iostream>
#define pf printf
#include<cstdio>
#define dbug(x) cout<<">"<<x<<endl


using namespace std;

int main()
{
 int a,i,sum,t;
 int cnt=0;
 while(cin>>t)
 {
  
  while(t--)
  {
   sum=0;
   for(i=0; i<3; i++)
   { 
    cin>>a;
    sum+=a;
   }
   if(sum>=2) cnt++;
  }
  cout<<cnt<<endl;
  cnt=0;
 }
 
 
 return 0;
}

No comments:

Post a Comment

Thank you for commenting. Please wait for response :)