Algorithm
Code Examples
#1 Code Example with C++ Programming
Code -
C++ Programming
#include<iostream>
using namespace std;
int main(){
int n;
cin>>n;
int surity = 0, count = 0, sure;
for(int i = 0; i < n; i++){
sure = 0;
for(int j = 0; j < 3; j++){
cin>>surity;
sure += surity;
}
if(sure >= 2){
count++;
}
}
cout<<count<<endl;
return 0;
}
Copy The Code &
Try With Live Editor
Input
3
1 1 0
1 1 1
1 0 0
1 1 0
1 1 1
1 0 0
Output
2
1 0 0
0 1 1
1 0 0
0 1 1
Demonstration
Codeforcess Solution 231-A A. Team ,C++, Java, Js and Python,231-A,Codeforcess Solution