Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- file = open('19.txt')
- s = file.readline()
- l = 0
- kt = 0
- ans = 0
- for r in range(1, len(s)):
- if s[r] == 'T':
- kt += 1
- while kt >= 100:
- if s[l] == 'T':
- kt -= 1
- l += 1
- ans = max(ans, r - l + 1)
- print(ans)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement