#define make_pair mp
#define emplace_back pb
#include <bits/stdc++.h>
using namespace std;
mt19937 mt_rand(time(0));
const int N = 105;
int n;
char s[N];
int main()
{
scanf("%d", &n);
scanf("%s", s);
int res = 0;
for(int i=0;i<10;i++) {
bool fl = 0;
for(int j=i*(n/10);j<(i+1)*(n/10);j++) {
if(s[j] == 'N') fl = 1;
}
if(!fl) res++;
}
printf("%d\n", res);
return 0;
}
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | #define make_pair mp #define emplace_back pb #include <bits/stdc++.h> using namespace std; mt19937 mt_rand(time(0)); const int N = 105; int n; char s[N]; int main() { scanf("%d", &n); scanf("%s", s); int res = 0; for(int i=0;i<10;i++) { bool fl = 0; for(int j=i*(n/10);j<(i+1)*(n/10);j++) { if(s[j] == 'N') fl = 1; } if(!fl) res++; } printf("%d\n", res); return 0; } |
English