这里写图片描述 这里写图片描述

代码早些了 然后一是输出没有换行 二来没注意数据范围

当时还是年轻啊~ 翻旧题 拿这个纪念一下吧

#include<stdio.h>
int main() {
    long long a=0,b=0,x1,x2,y1,y2,q,w;
    while(scanf("%lld %lld %lld %lld %lld %lld",&x1,&y1,&x2,&y2,&q,&w),
            x1!=0||x2!=0||y1!=0||y2!=0||q!=0||w!=0) {
        a=(q*y2-x2*w)/(x1*y2-x2*y1);
        b=(q*y1-x1*w)/(x2*y1-x1*y2);
        printf("%lld %lld\n",a,b);
    }
    return 0;
}

【郑轻】[1743]解方程

© DiDaPiPa all right reserved,powered by GitbookRevision Time: 2020-03-12 21:32:06

results matching ""

    No results matching ""