dingming 2008-09-29 00:00:00
点我顶贴
收藏
删除
var a1,b1,c1,a2,b2,c2:integer;
x,y:integer;
boolx,booly:boolean;
begin
readln(a1,b1,c1);
readln(a2,b2,c2);
x:=(c1*b2-c2*b1)div(a1*b2-a2*b1);
y:=(c1*a2-c2*a1)div(b1*a2-a1*b2);
if (c1*b2-c2*b1)mod(a1*b2-a2*b1)=0 then boolx:=true else boolx:=false;
if (c1*a2-c2*a1)mod(b1*a2-a1*b2)=0 then booly:=true else booly:=false;
if (boolx)and(booly) then writeln(x,’ ’,y);
if (not boolx)or(not booly) then writeln(’NO INTEGER ROOT’);
end.