Untitled
Anonymous
Python
04/11/2023 12:24 PM
216 B
12
Indexable
Never
f = open('24.3.txt')
s = f.readline().split("G")
cnt = 0
res = []
x = 'G'
for i in range(len(s)):
x += s[i] + 'G'
if s[i].count("I") <= 4:
res.append( len(x))
else:
x = "G"
print(max(res))Editor is loading...