Advertisement
Korotkodul

N24_sample

Jun 12th, 2023
927
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.22 KB | None | 0 0
  1. f = open('24.txt')
  2. s = f.readline()
  3. f.close()
  4. s = s.replace('O', 'A')
  5. s = s.replace('D', 'C')
  6. s = s.replace('F', 'C')
  7. k = 0
  8. t = ''
  9. for i in range(1000):
  10.     t = 'CA' * i
  11.     if t in s:
  12.         k = max(k, i)
  13. print(k)
  14.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement