Skip to content

Commit 9791fff

Browse files
committed
Create team_231A.cpp
1 parent c3733a9 commit 9791fff

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

team_231A.cpp

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#include <iostream>
2+
#include<string>
3+
using namespace std;
4+
5+
int main() {
6+
int count = 0,n,a,b,c;
7+
8+
cin >> n;
9+
10+
while(n-- > 0)
11+
{
12+
cin >> a >> b >> c;
13+
14+
if(a == 1 && b == 1 && c == 1) {
15+
count++;
16+
}
17+
else if(a == 1 && b == 1 && c == 0){
18+
count++;
19+
}
20+
else if(a == 0 && b == 1 && c == 1){
21+
count++;
22+
}
23+
else if(a == 1 && b == 0 && c == 1){
24+
count++;
25+
}
26+
}
27+
cout << count << endl;
28+
return 0;
29+
}
30+
31+

0 commit comments

Comments
 (0)