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
29
30
31
32
33
34
35
36
#include <iostream>

using namespace std;

int main()
{
    int i, n, punkty=0;
    string tn;
    cin>>n;
    if (n % 10 != 0 || n<10 || n>100) {
        return 0;
    }
    cin>>tn;
    if (tn.length() != n) {
        return 0;
    }
    
    for (i = 0; i < n ; i+=n/10)
    {
        char wy = tn[i];
        int ok = 0;
        for (int j = 0; j < n/10; j++)
        {
            if ((tn[i+j] == 'T') && (tn[i+j] == wy)) {
                ok++;
            }
            
        }
         if ( ok == n/10) {
             punkty++;
         }
    }
    cout <<punkty << endl;

    return 0;
}