讨论 / 为什么是错的
李一恒 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.

#1 shuizilong96@2008-11-27 06:17:00
回复 删除
这个可以有上万盘的。。。
#2 Jollwish@2008-11-28 06:11:00
回复 删除
如果双方分差不大于一,还得继续比..
查看更多回复
提交回复