[
]粘错了procedure TForm1.btn1Click(Sender: TObject);var a1,a2,b1,b2,c1,c2,d1,d2:Integer
num
WORD;begin num:=0
for a1:=1 to 19 do begin for a2:= 1 to 19 do begin For b1:=1 to 19 do begin for b2:=1 to 19 do begin if a1=b1 then begin if a2=1 then begin if (b2=1) or (b2=2) then Continue
end
if a2=19 then begin if (b2=18) or (b2=19) then Continue
end
if Abs(b2-a2)<=1 then Continue
end
for c1:=1 to 19 do begin for c2:=1 to 19 do begin if (a1=c1) then begin if a2=1 then begin if (c2=1) or (c2=2) then Continue
end
if a2=19 then begin if (c2=18) or (c2=19) then Continue
end
if Abs(c2-a2)<=1 then Continue
end
if (c1=b1) then begin if b2=1 then begin if (c2=1) or (c2=2) then Continue
end
if b2=19 then begin if (c2=18) or (c2=19) then Continue
end
if Abs(c2-b2)<=1 then Continue
end
for d1:=1 to 19 do begin for d2:= 1 to 19 do begin if (a1=d1) then begin if a2=1 then begin if (d2=1) or (d2=2) then Continue
end
if a2=19 then begin if (d2=18) or (d2=19) then Continue
end
if Abs(d2-a2)<=1 then Continue
end
if (d1=b1) then begin if b2=1 then begin if (d2=1) or (d2=2) then Continue
end
if b2=19 then begin if (d2=18) or (d2=19) then Continue
end
if Abs(d2-b2)<=1 then Continue
end
if (d1=c1) then begin if c2=1 then begin if (d2=1) or (d2=2) then Continue
end
if c2=19 then begin if (d2=18) or (d2=19) then Continue
end
if Abs(d2-c2)<=1 then Continue
end
if Abs(d1-a1)=1 then begin if Abs(d2-a2)<=1 then Continue
end
if Abs(d1-b1)=1 then begin if Abs(d2-b2)<=1 then Continue
end
if Abs(d1-c1)=1 then begin if Abs(d2-c2)<=1 then Continue
end
// mmo1.Lines.Add(' a1:'+inttostr(a1)+' a2:'+inttostr(a2)+' b1:'+inttostr(b1)+' b2:'+inttostr(b2)+' c1:'+inttostr(c1)+' c2:'+inttostr(c2)+' d1:'+inttostr(d1)+' d2:'+inttostr(d2))
//AddLog(' a1:'+inttostr(a1)+' a2:'+inttostr(a2)+' b1:'+inttostr(b1)+' b2:'+inttostr(b2)+' c1:'+inttostr(c1)+' c2:'+inttostr(c2)+' d1:'+inttostr(d1)+' d2:'+inttostr(d2))
Inc(num)
end
end
end
end
end
end
end
end
edt1.Text:=IntToStr(num);end;