NEW WORLD 2013-11-04 04:49:01
点我顶贴
收藏
删除
var i,j,k,l,m,n,a,len,b,c,d:longint;
ar:array[1..1000]of string;
s1,s2,st:string;
begin
readln(st);
i:=1;
len:=length(st);
while (st[i]<>'E')and(i<=len) do
begin
case st[i] of
'W':begin inc(a);inc(c);end;
'L':begin inc(b);inc(d);end;
end;
inc(i);
if ((a>=11)or(b>=11))and(abs(a-b)>1) then
begin
writeln(a,':',b);
a:=0;b:=0;
end;
if ((c>=21)or(d>=21))and(abs(c-d)>1) then
begin
inc(k);
str(c,s1);
str(d,s2);
ar[k]:=s1+':'+s2;
c:=0;d:=0;
end;
if i>20 then
begin
readln(st);
i:=1;
end;
end;
writeln(a,':',b);
writeln;
for i:=1 to k do
writeln(ar[i]);
writeln(c,':',d);
end.