fork download
  1. #include<iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. int n,a,sol=0,count;
  7. cin >> n;
  8. for(int i=0;i<n;i++)
  9. {
  10.  
  11. count=0;
  12. for(int j=0;j<3;j++)
  13. {
  14. cin >> a;
  15. if(a == 1)
  16. count++;
  17. if(count == 2)
  18. {
  19. sol++;
  20. break;
  21. }
  22. }
  23. }
  24. cout << sol << endl;
  25. return 0;
  26. }
Success #stdin #stdout 0s 15232KB
stdin
3
1 1 0
1 0 0
1 1 0
stdout
2