#include <iostream>
int main() {
int n;
int pkt = 0;
std::cin >> n;
for(int i = 0; i < 10; ++i) {
bool git = true;
for(int j = 0; j < n/10; ++j) {
char t;
std::cin >> t;
if(t == 'N') {
git = false;
}
}
if(git) pkt++;
}
std::cout << pkt << std::endl;
}
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | #include <iostream> int main() { int n; int pkt = 0; std::cin >> n; for(int i = 0; i < 10; ++i) { bool git = true; for(int j = 0; j < n/10; ++j) { char t; std::cin >> t; if(t == 'N') { git = false; } } if(git) pkt++; } std::cout << pkt << std::endl; } |
English