Advertisement
nq1s788

24 не больше 140 CD

Dec 21st, 2024
24
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.21 KB | None | 0 0
  1. #https://inf-ege.sdamgia.ru/problem?id=70085
  2. s = open("24.txt").read()
  3. s = s.replace('CD', 'C D').split()
  4. maxi = 0
  5. for i in range(len(s)):
  6.     r = ''.join(s[i:i + 141])
  7.     maxi = max(maxi, len(r))
  8. print(maxi)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement