#include <bits/stdc++.h>
using namespace std;
char t;
int n, cnt, wyn;
bool check;
int main() {
ios_base::sync_with_stdio(0);
cin >> n;
int cnt = n / 10;
int licz = 0;
for (int i = 1; i <= 10; i++) {
check = true;
for (int j = 1; j <= cnt; j++) {
cin >> t;
if (t == 'N') check = false;
}
if (check) {
wyn++;
}
}
cout << wyn;
}
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | #include <bits/stdc++.h> using namespace std; char t; int n, cnt, wyn; bool check; int main() { ios_base::sync_with_stdio(0); cin >> n; int cnt = n / 10; int licz = 0; for (int i = 1; i <= 10; i++) { check = true; for (int j = 1; j <= cnt; j++) { cin >> t; if (t == 'N') check = false; } if (check) { wyn++; } } cout << wyn; } |
English