import sys input = sys.stdin.readline n = int(input()) s = input() g = n // 10 ans = 0 for i in range(10): if all([t == 'T' for t in s[i*g:(i+1)*g]]): ans += 1 print(ans)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | import sys input = sys.stdin.readline n = int(input()) s = input() g = n // 10 ans = 0 for i in range(10): if all([t == 'T' for t in s[i*g:(i+1)*g]]): ans += 1 print(ans) |