Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- s = open('24.txt').readline()
- answ = 0 #самая длинная которую мы нашли
- cur = 0 #длина текущей подстроки из Y
- for c in s:
- if c == 'Y':
- cur += 1
- answ = max(answ, cur)
- else:
- cur = 0
- print(answ)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement