李一恒 2008-11-28 06:11:00
点我顶贴
收藏
删除
var a:packed array[1..2000] of char;
w,l,i,j,k,s,n:integer;
begin
read(a);
for i:=1 to 2000 do
while a[i]<>’E’ do begin
if a[i]=’W’ then w:=w+1;
if a[i]=’L’ then l:=l+1;
if (w=11) or (l=11) then begin writeln(w,’:’,l);w:=0;
l:=0;
end;
end;
writeln(w,’:’,l);
w:=0;
l:=0;
for i:=1 to 2000 do
while a[i]<>’E’ do begin
if a[i]=’W’ then w:=w+1;
if a[i]=’L’ then l:=l+1;
if (w=21) or (l=21) then begin writeln(w,’:’,l);w:=0;
l:=0;
end;
end;
write(w,’:’,l);
end.