Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- f = '0' + open('24.txt').readline()
- answ = 0
- cur = 0
- for i in range(1, len(f)):
- if f[i] != f[i - 1]:
- cur += 1
- if cur > answ:
- answ = cur
- else:
- cur = 0
- print(answ)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement