mirror of
https://github.com/Alexander-D-Karpov/scripts.git
synced 2024-11-22 11:56:33 +03:00
14 lines
298 B
Python
Vendored
14 lines
298 B
Python
Vendored
with open("24.txt") as f:
|
|
data = f.read()
|
|
|
|
mx = 0
|
|
for i in range(len(data)):
|
|
for j in range(i + 1, len(data)):
|
|
s = data[i:j]
|
|
if s.count("Z") <= 2:
|
|
if len(s) > mx:
|
|
mx = len(s)
|
|
print(mx)
|
|
else:
|
|
break
|