#include <iostream>
using namespace std;
int main() {
// your code goes here
int n,r=0;
scanf("%d\n",&n);
for(int i =0;i<10;i++)
{
bool zal = true;
for(int j=0;j<n/10;j++)
{
char c;
scanf("%c",&c);
if(c=='N')zal=false;
}
if(zal)r++;
}
printf("%d",r);
return 0;
}
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | #include <iostream> using namespace std; int main() { // your code goes here int n,r=0; scanf("%d\n",&n); for(int i =0;i<10;i++) { bool zal = true; for(int j=0;j<n/10;j++) { char c; scanf("%c",&c); if(c=='N')zal=false; } if(zal)r++; } printf("%d",r); return 0; } |
English