Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- s = open("24.txt").readline()
- answ = 0
- cur = 0 #текущая длина
- lst = '!'
- for e in s:
- if cur == 0 or e != lst:
- cur += 1
- lst = e
- answ = max(answ, cur)
- else:
- cur = 1
- lst = e
- print(answ)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement