n = int(input())
group_len = n // 10
all_correct = 'T' * group_len
tests = input()
points = 0
for i in range(0, 10):
if tests[i*group_len : (i+1)*group_len] == all_correct:
points += 1
print(points)
1 2 3 4 5 6 7 8 9 10 11 | n = int(input()) group_len = n // 10 all_correct = 'T' * group_len tests = input() points = 0 for i in range(0, 10): if tests[i*group_len : (i+1)*group_len] == all_correct: points += 1 print(points) |
English