- 乒乓球
- 2012-10-19 16:59:08 @
Program ppq;
Var
i,j,w1,w2,j1,j2:longint;
s:string[20];
f:boolean;
w,l:array[1..60000]of word;
begin
readln(s); j:=0; w1:=0; w2:=0; j1:=0; j2:=0; f:=true;
while f do
begin
for i:=1 to length(s) do
begin
case s[i] of
'W':begin w1:=w1+1; w2:=w2+1; end;
'L':begin j1:=j1+1; j2:=j2+1; end;
'E':begin f:=false; break; end;
end;
if(w1=11)or(j1=11)and(abs(w1-j1)>1)then
begin writeln(w1,':',j1); w1:=0; j1:=0; end;
if(w2=21)or(j2=21)and(abs(w2-j2)>1)then
begin j:=j+1; w[j]:=w2; l[j]:=j2; w2:=0; j2:=0; end;
end;
if f then readln(s);
end;
writeln(w1,':',j1); writeln;
for i:=1 to j do writeln(w[i],':',l[i]); writeln(w2,':',j2);
end.
1 条评论
-
wzhyhm LV 8 @ 2012-10-19 20:14:29
说错了 是只过了1.6.7.8.10
说错了 是只过了1.6.7.8.10点
- 1