#include <iostream>
using namespace std;
int main()
{
int n;
cin>>n;
char wynik;
int sumaPunktow = 0;
for(int ii=0; ii<10; ii++) // iteracja po grupach testow
{
bool czyPunkt=true;
for (int t=0; t<n/10; t++) // iteracja po testach w grupie
{
cin>>wynik;
if (wynik=='N')
czyPunkt=false;
}
if (czyPunkt)
sumaPunktow ++;
}
cout << sumaPunktow << endl;
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 24 25 26 27 28 | #include <iostream> using namespace std; int main() { int n; cin>>n; char wynik; int sumaPunktow = 0; for(int ii=0; ii<10; ii++) // iteracja po grupach testow { bool czyPunkt=true; for (int t=0; t<n/10; t++) // iteracja po testach w grupie { cin>>wynik; if (wynik=='N') czyPunkt=false; } if (czyPunkt) sumaPunktow ++; } cout << sumaPunktow << endl; return 0; } |
English