大牛帮看下
program d336;
var
c:array[1..9000]of char;
n,i,l,x,y,g:longint;
begin
readln(n);
for i:=1to n do begin
g:=0;
x:=0;
c:='';
while not eoln do begin
x:=x+1;
read(c[x]);
end;
for l:=x downto 1 do begin
val(c[l],y);
if y=1 then
if l/2=l div 2
then g:=g+2
else g:=g+1;
end;
if g mod 3=0
then writeln('Yes')
else writeln('No');
readln;
end;
end.
应该如何修改,有没有更好的思路?