Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #https://inf-ege.sdamgia.ru/problem?id=27421
- s = open('24_demo.txt').readline()
- answ = 1
- cnt = 1 #длина тек строки
- for i in range(1, len(s)):
- if s[i] != s[i - 1]:
- cnt += 1
- answ = max(answ, cnt)
- else:
- cnt = 1
- print(answ)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement