#include<bits/stdc++.h>
using namespace std;
int main()
{
bool t=1;
int a,w=0;
char b;
cin >> a;
for(int i=0;i<10;i++)
{
for(int j=0;j<a/10;j++)
{
cin >> b;
if(b=='N')
t=0;
}
w+=t;
t=1;
}
cout << w;
}
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | #include<bits/stdc++.h> using namespace std; int main() { bool t=1; int a,w=0; char b; cin >> a; for(int i=0;i<10;i++) { for(int j=0;j<a/10;j++) { cin >> b; if(b=='N') t=0; } w+=t; t=1; } cout << w; } |
English