S = ''
while True:
s = input()
if 'E' in s:
S += s.split('E')[0]
break
S += s
def match(x,s):
cnt = 0
while True:
scorea = 0
scoreb = 0
d = 0
while (max(scorea,scoreb) < x or d < 2) and cnt < len(s):
if s[cnt] == 'W':
scorea += 1
else:
scoreb += 1
cnt += 1
d = abs(scorea - scoreb)
print(f'{scorea}:{scoreb}')
if cnt == len(s):
break
match(11,S)
print('')
match(21,S)
能不能解释一下
为什么
文本比对一模一样的输出,结果全部WA