Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- f = open('zadanie24_1.txt').readline()
- answ = 0 #самая длина длина которую мы нашли
- cur = 0 #текущая длина
- for i in range(len(f)):
- if f[i] == 'C':
- cur += 1
- if cur > answ:
- answ = cur
- else:
- cur = 0
- print(answ)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement