Advertisement
Zuneve

Untitled

Apr 29th, 2024
26
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. f = open("24_5139.txt")
  2. h = f.readline()
  3. g = 'AEU'
  4. s = 'BCDF'
  5. cnt = 0
  6. mx = 0
  7. for i in range(2, len(h) - 1, 3):
  8. if h[i - 1] in s and h[i] in g and h[i + 1] in s:
  9. cnt += 1
  10. else:
  11. mx = max(cnt, mx)
  12. cnt = 0
  13. print(max(mx, cnt))
  14.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement