Last active
June 21, 2017 15:36
-
-
Save MohamedTaha98/7246954afffe8eb4ae7c2a75ae354d54 to your computer and use it in GitHub Desktop.
Problem Solving
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main() { | |
int n, solved = 0, sures; | |
cin >> n; | |
int ar[3]; | |
for (int probs = 0; probs < n; probs++) { | |
sures = 0; | |
for (int i = 0; i < 3; i++) { | |
cin >> ar[i]; | |
if (ar[i] == 1) | |
sures++; | |
} | |
if (sures >= 2) | |
solved++; | |
} | |
cout << solved; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment