问题描述
给定一个二元一次方程组,形如:
a * x + b * y = c;
d * x + e * y = f;
x,y代表未知数,a, b, c, d, e, f为参数。
求解x,y
#include <cstdio>
int main(int argc, char** argv) {
int a, b, c, d, e, f;
scanf("%d%d%d%d%d%d",&a,&b,&c,&d,&e,&f);
printf("%d %d\n",(c*e-b*f)/(a*e-b*d), (c*d-a*f)/(b*d-a*e));
return 0;
}