n = int(input())
lista = input()
pom = 0
pom2 = 0
for i in range(10):
for j in range(n // 10):
if lista[(i*(n//10))+j] == 'T':
pom += 1
else:
break
if pom == n/10:
pom2 += 1
pom = 0
print(pom2)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | n = int(input()) lista = input() pom = 0 pom2 = 0 for i in range(10): for j in range(n // 10): if lista[(i*(n//10))+j] == 'T': pom += 1 else: break if pom == n/10: pom2 += 1 pom = 0 print(pom2) |
English