Untitled
unknown
python
2 years ago
216 B
5
Indexable
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...