mirror of
https://github.com/Alexander-D-Karpov/scripts.git
synced 2024-11-22 11:56:33 +03:00
21 lines
354 B
Python
Vendored
21 lines
354 B
Python
Vendored
with open("24.txt") as f:
|
|
data = f.read()
|
|
|
|
sgl = "CDF"
|
|
gl = "AO"
|
|
|
|
mx = 0
|
|
n = 0
|
|
|
|
for xr in range(3):
|
|
for i in range(xr, len(data) - 2, 3):
|
|
i1 = data[i]
|
|
i3 = data[i + 2]
|
|
if i1 in sgl and i3 in gl:
|
|
n += 1
|
|
else:
|
|
if n > mx:
|
|
mx = n
|
|
n = 0
|
|
print(mx)
|