mirror of
https://github.com/Alexander-D-Karpov/scripts.git
synced 2024-11-22 11:56:33 +03:00
22 lines
419 B
Python
Vendored
22 lines
419 B
Python
Vendored
with open("24.txt") as f:
|
|
data = f.read()
|
|
|
|
k = 0
|
|
m = 0
|
|
f = False
|
|
for j in range(3):
|
|
for i in range(j, len(data), 3):
|
|
w = data[i - 3 : i]
|
|
if w in ["CFE", "FCE"]:
|
|
if f:
|
|
k += 1
|
|
else:
|
|
f = True
|
|
k = 1
|
|
else:
|
|
f = False
|
|
if k > m:
|
|
m = k
|
|
k = 0
|
|
print(m)
|