Advertisement
Farz0l1x

Untitled

Feb 27th, 2024
823
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.29 KB | None | 0 0
  1. file = open('24_12931.txt')
  2. s = file.readline()
  3. ans = 'VWXYZ'
  4. while ans in s:
  5.     ans += 'VWXYZ'
  6. while ans not in s:
  7.     ans = ans[:-1]
  8. if 'YZ' + ans in s:
  9.     print(len('YZ' + ans))
  10. if 'XYZ' + ans in s:
  11.     print(len('XYZ' + ans))
  12. if 'WXYZ' + ans in s:
  13.     print(len('WXYZ' + ans))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement