fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main() {
  5. int n;
  6. cin >> n;
  7.  
  8. int g = 0;
  9.  
  10. for (int i = 0; i < n; i++) {
  11. int a, b, c;
  12. cin >> a >> b >> c;
  13.  
  14. if (a + b + c >= 2) {
  15. g++;
  16. }
  17. }
  18.  
  19. cout << g << endl;
  20. return 0;
  21. }
Success #stdin #stdout 0.01s 5288KB
stdin
3
110
100
111
stdout
3