Advertisement
Farz0l1x

Untitled

Mar 27th, 2024
400
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.15 KB | None | 0 0
  1. file = open('14.txt')
  2. s = file.readline()
  3. f = [1] * len(s)
  4. for i in range(1, len(s)):
  5.     if s[i] < s[i-1]:
  6.         f[i] = f[i-1] + 1
  7. print(max(f))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement