Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- f = open("24_5139.txt")
- h = f.readline()
- g = 'AEU'
- s = 'BCDF'
- cnt = 0
- mx = 0
- for i in range(2, len(h) - 1, 3):
- if h[i - 1] in s and h[i] in g and h[i + 1] in s:
- cnt += 1
- else:
- mx = max(cnt, mx)
- cnt = 0
- print(max(mx, cnt))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement