This commit is contained in:
Victor Alexandrovich Tsyrenschikov
2025-10-21 09:04:56 +05:00
parent ff258f68a4
commit c96d76f7da
2 changed files with 13 additions and 0 deletions

1
24__.txt Normal file

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,12 @@
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)