Files
pythonProject/546456.py
Victor Alexandrovich Tsyrenschikov c96d76f7da Project
2025-11-21 00:03:34 +05:00

12 lines
249 B
Python

CD=open("24__.txt").readline().strip()
position=[]
for i in range(len(CD) - 1):
if CD[i:i+2] == 'CD':
position.append(i)
position.append(len(CD) - 1)
ml = 0
for p, p1 in zip(position, position[161:]):
ml = max(ml, p1 - p)
print(ml)