xtc820 2014-07-22 17:39:16
点我顶贴
收藏
删除
var a,b,c,d,e,f,x,y:integer;
begin
readln(a,b,c);
readln(d,e,f);
if( b*d-a*e<>0) and((round((b*f-c*e)/(b*d-a*e))=(b*f-c*e)/(b*d-a*e)))
then x:=round((b*f-c*e)/(b*d-a*e))
else begin writeln('NO INTEGER ROOT');halt;end;
if (b<>0)and(round((c-a*x)/b)=(c-a*x)/b)
then y:=round((c-a*x)/b)
else begin writeln('NO INTEGER ROOT');halt;end;
writeln(x,' ',y);
end.