Problem:


Simultaneous Equation

Write a program which solve a simultaneous equation:

 ax + by = c

 dx + ey = f

The program should print x and y for given a, b, c, d, e and f (-1,000 ≤ a, b, c, d, e, f ≤ 1,000). You can suppose that given equation has a unique solution.

Input

The input consists of several data sets, 1 line for each data set. In a data set, there will be a, b, c, d, e, f separated by a single space. The input terminates with EOF.

Output

For each data set, print x and y separated by a single space. Print the solution to three places of decimals. Round off the solution to three decimal places.

Sample Input 1

1 2 3 4 5 6
2 -1 -2 -1 -1 -5

Output for the Sample Input 1

-1.000 2.000
1.000 4.000

Sample Input 2

2 -1 -3 1 -1 -3
2 -1 -3 -9 9 27

Output for the Sample Input 2

0.000 3.000
0.000 3.000



Sample input:
1 2 3 4 5 6
2 -1 -2 -1 -1 -5


Sample output:
-1.000 2.000
1.000 4.000

Submission status: Wrong Answer

Solution code:
while True:
    try:
        a,b,c,d,e,f=map(int,raw_input().split())
        if a*d-b*c==0:
            print "not exist answer"
        else:
            x = (c*e-b*f) / (a*e-b*d)
            y = (a*f-c*d) / (a*e-b*d)

            if x==-0:
                x=0
            if y==-0:
                y=0
            print ('%.3f' % x), ('%.3f' % y)
    except:
        break

Submission status: Wrong Answer

Solution code:
while True:
    try:
        a,b,c,d,e,f=map(int,raw_input().split())
        if a*d-b*c==0:
            print "not exist answer"
        else:
            x = (c*e-b*f) / (a*e-b*d)
            y = (a*f-c*d) / (a*e-b*d)
            print ('%.3f' % round(x,3)), ('%.3f' % round(y,3))
    except:
        break

Submission status: Wrong Answer

Solution code:
while True:
    try:
        a,b,c,d,e,f=map(int,raw_input().split())
        if a*d-b*c==0:
            print "not exist answer"
        else:
            x = float((c*e-b*f)) / (a*e-b*d)
            y = float((a*f-c*d)) / (a*e-b*d)
            print ('%.3f' % round(x,3)), ('%.3f' % round(y,3))
    except:
        break

Submission status: Wrong Answer

Solution code:
while True:
    try:
        a,b,c,d,e,f=map(float,raw_input().split())
        if a*d-b*c==0:
            print "not exist answer"
        else:
            x = float((c*e-b*f)) / (a*e-b*d)
            y = float((a*f-c*d)) / (a*e-b*d)
            print ('%.3f' % round(x,3)), ('%.3f' % round(y,3))
    except:
        break

Submission status: Wrong Answer

Solution code:
import sys


def det(mat):
  t = 1 / (mat[0][0] * mat[1][1] - mat[0][1] * mat[1][0])
  a = t * mat[1][1]
  b = t * -1 * mat[0][1]
  c = t * -1 * mat[1][0]
  d = t * mat[0][0]
  return [[a, b], [c, d]]


for line in sys.stdin:
  try:
    a, b, c, d, e, f = [int(i) for i in line.split()]
    A = [[a, b], [d, e]]
    P = [c, f]
    detA = det(A)
    print("%lf %lf" % (detA[0][0] * P[0] + detA[0][1] * P[1], detA[1][0] * P[0] + detA[1][1] * P[1]))
  except:
    break

Submission status: Wrong Answer

Solution code:
class Equation():
    def __init__(self, a, b, c, d, e, f):
        self.a = a
        self.b = b
        self.c = c
        self.d = d
        self.e = e
        self.f = f

    def calc(self):
        temp = (self.a * self.e - self.b * self.d)
        temp_a = (self.c * self.e - self.b * self.f)
        temp_b = (self.f * self.a - self.c * self.d)
        x = round(temp_a/temp,4)
        y = round(temp_b/temp,4)

        return x, y

    def print(self):
        self.ans = self.calc()
        print("{0:.3f} {1:.3f}".format(self.ans[0],self.ans[1]))


def main():
    data = []
    while 1:
        try:
            n = input().split()

            a = float(n[0])
            b = float(n[1])
            c = float(n[2])
            d = float(n[3])
            e = float(n[4])
            f = float(n[5])

            data.append(Equation(a, b, c, d, e, f))

        except EOFError:
            break

    for datas in data:
        datas.print()

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
import math

def my_round(x,d=0):
    p = 10 ** d
    return float(math.floor((x * p) + math.copysign(0.5, x))) / p

class Equation():
    def __init__(self, a, b, c, d, e, f):
        self.a = a
        self.b = b
        self.c = c
        self.d = d
        self.e = e
        self.f = f

    def calc(self):
        temp = (self.a * self.e - self.b * self.d)
        temp_a = (self.c * self.e - self.b * self.f)
        temp_b = (self.f * self.a - self.c * self.d)
        x = my_round(temp_a/temp,4)
        y = my_round(temp_b/temp,4)

        return x, y

    def print(self):
        self.ans = self.calc()
        print("{0:.3f} {1:.3f}".format(self.ans[0],self.ans[1]))


def main():
    data = []
    while 1:
        try:
            n = input().split()

            a = float(n[0])
            b = float(n[1])
            c = float(n[2])
            d = float(n[3])
            e = float(n[4])
            f = float(n[5])

            data.append(Equation(a, b, c, d, e, f))

        except EOFError:
            break

    for datas in data:
        datas.print()

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
import math

def my_round(x,d=0):
    p = 10 ** d
    return float(math.floor((x * p) + math.copysign(0.5, x))) / p

class Equation():
    def __init__(self, a, b, c, d, e, f):
        self.a = a
        self.b = b
        self.c = c
        self.d = d
        self.e = e
        self.f = f

    def calc(self):
        temp = (self.a * self.e - self.b * self.d)
        temp_a = (self.c * self.e - self.b * self.f)
        temp_b = (self.f * self.a - self.c * self.d)
        x = my_round(temp_a/temp, 4)
        y = my_round(temp_b/temp, 4)
        print("{0:.3f} {1:.3f}".format(x, y))


def main():
    data = []

    while 1:
        try:
            n = input().split()

            a = float(n[0])
            b = float(n[1])
            c = float(n[2])
            d = float(n[3])
            e = float(n[4])
            f = float(n[5])

            data.append(Equation(a, b, c, d, e, f))

        except EOFError:
            break

    for num in data:
        num.calc()

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
import math

def my_round(x,d=0):
    p = 10 ** d
    return float(math.floor((x * p) + math.copysign(0.5, x))) / p

class Equation():
    def __init__(self, a, b, c, d, e, f):
        self.a = a
        self.b = b
        self.c = c
        self.d = d
        self.e = e
        self.f = f

    def calc(self):
        temp = (self.a * self.e - self.b * self.d)
        temp_a = (self.c * self.e - self.b * self.f)
        temp_b = (self.a * self.f - self.c * self.d)
        x = my_round(temp_a / temp, 4)
        y = my_round(temp_b / temp, 4)
        return x, y

    def print(self):
        ans = self.calc()
        print("{0:.3f} {1:.3f}".format(ans[0], ans[1]))


def main():
    data = []

    while 1:
        try:
            n = input().split()

            a = float(n[0])
            b = float(n[1])
            c = float(n[2])
            d = float(n[3])
            e = float(n[4])
            f = float(n[5])

            data.append(Equation(a, b, c, d, e, f))

        except EOFError:
            break

    for num in data:
        num.print()

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
import math

def my_round(x,d=0):
    p = 10 ** d
    return float(math.floor((x * p) + math.copysign(0.5, x))) / p

class Equation():
    def __init__(self, a, b, c, d, e, f):
        self.a = a
        self.b = b
        self.c = c
        self.d = d
        self.e = e
        self.f = f

    def calc(self):
        temp = (self.a * self.e - self.b * self.d)
        temp_a = (self.c * self.e - self.b * self.f)
        temp_b = (self.a * self.f - self.c * self.d)
        try:
            x = my_round(temp_a / temp, 4)
        except ZeroDivisionError:
            x = my_round(temp_a / 1.0, 4)

        try:
            y = my_round(temp_b / temp, 4)
        except ZeroDivisionError:
            y = my_round(temp_b / 1.0, 4)

        return x, y


    def print(self):
        ans = self.calc()
        print("{0:.3f} {1:.3f}".format(ans[0], ans[1]))


def main():
    data = []

    while 1:
        try:
            n = input().split()

            a = float(n[0])
            b = float(n[1])
            c = float(n[2])
            d = float(n[3])
            e = float(n[4])
            f = float(n[5])

            data.append(Equation(a, b, c, d, e, f))

        except EOFError:
            break

    for num in data:
        num.print()

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
import math

def my_round(x,d=0):
    p = 10 ** d
    return float(math.floor((x * p) + math.copysign(0.5, x))) / p

class Equation():
    def __init__(self, a, b, c, d, e, f):
        self.a = a
        self.b = b
        self.c = c
        self.d = d
        self.e = e
        self.f = f

    def calc(self):
        temp = (self.a * self.e - self.b * self.d)
        temp_a = (self.c * self.e - self.b * self.f)
        temp_b = (self.a * self.f - self.c * self.d)
        try:
            x = my_round(temp_a / temp, 4)
        except ZeroDivisionError:
            x = my_round(temp_a / 1.0, 4)

        try:
            y = my_round(temp_b / temp, 4)
        except ZeroDivisionError:
            y = my_round(temp_b / 1.0, 4)

        return x, y


    def print(self):
        ans = self.calc()
        print("{0:.3f} {1:.3f}".format(ans[0], ans[1]))


def main():
    data = []

    while 1:
        try:
            n = input().split()
            
            if n is None:
                break
                
            a = float(n[0])
            b = float(n[1])
            c = float(n[2])
            d = float(n[3])
            e = float(n[4])
            f = float(n[5])

            data.append(Equation(a, b, c, d, e, f))

        except EOFError:
            break

    for num in data:
        num.print()

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
import math

def my_round(x,d=0):
    p = 10 ** d
    return float(math.floor((x * p) + math.copysign(0.5, x))) / p

class Equation():
    def __init__(self, a, b, c, d, e, f):
        self.a = a
        self.b = b
        self.c = c
        self.d = d
        self.e = e
        self.f = f

    def calc(self):
        temp = (self.a * self.e - self.b * self.d)
        temp_a = (self.c * self.e - self.b * self.f)
        temp_b = (self.a * self.f - self.c * self.d)
        try:
            x = my_round(temp_a / temp, 4)
            if x < 0.0:
                x *= -1
        except ZeroDivisionError:
            x = my_round(temp_a / 1.0, 4)

        try:
            y = my_round(temp_b / temp, 4)
            if x < 0.0:
                x *= -1
        except:
            y = my_round(temp_b / 1.0, 4)


        return x, y


    def print(self):
        ans = self.calc()
        print("{0:.3f} {1:.3f}".format(ans[0], ans[1]))


def main():
    data = []

    while 1:
        try:
            n = input().split()

            a = float(n[0])
            b = float(n[1])
            c = float(n[2])
            d = float(n[3])
            e = float(n[4])
            f = float(n[5])

            data.append(Equation(a, b, c, d, e, f))

        except EOFError:
            break

    for num in data:
        num.print()

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
import math

def my_round(x,d=0):
    p = 10 ** d
    return float(math.floor((x * p) + math.copysign(0.5, x))) / p

class Equation():
    def __init__(self, a, b, c, d, e, f):
        self.a = a
        self.b = b
        self.c = c
        self.d = d
        self.e = e
        self.f = f

    def calc(self):
        temp = (self.a * self.e - self.b * self.d)
        temp_a = (self.c * self.e - self.b * self.f)
        temp_b = (self.a * self.f - self.c * self.d)
        try:
            x = round(temp_a / temp, 4)
            if x < 0.0:
                x *= -1
        except ZeroDivisionError:
            x = round(temp_a / 1.0, 4)

        try:
            y = round(temp_b / temp, 4)
            if x < 0.1:
                x *= -1
        except:
            y = round(temp_b / 1.0, 4)


        return x, y


    def print(self):
        ans = self.calc()
        print("{0:.3f} {1:.3f}".format(ans[0], ans[1]))


def main():
    data = []

    while 1:
        try:
            n = input().split()

            a = float(n[0])
            b = float(n[1])
            c = float(n[2])
            d = float(n[3])
            e = float(n[4])
            f = float(n[5])

            data.append(Equation(a, b, c, d, e, f))

        except EOFError:
            break

    for num in data:
        num.print()

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
while True:
    try:
        input_line = input()
        if input_line == '':
            break
        else:
            a, b, c, d, e, f = map(int, input_line.split())
            x = (b*f-c*e) / (b*d-a*e)
            y = (c-a*x)/b
            print("{:.3f} {:.3f}".format(x,y))
    except EOFError:
        break

Submission status: Wrong Answer

Solution code:
import sys
for e in sys.stdin:
 a,b,c,d,e,f=map(int,e.split())
 print((c*d-a*f)/(b*d-a*e),(c*e-b*f)/(a*e-b*d))

Submission status: Wrong Answer

Solution code:
import sys
for e in sys.stdin:
 a,b,c,d,e,f=map(int,e.split())
 print("%-.4f %-.4f"%((c*e-b*f)/(a*e-b*d)+0,(c*d-a*f)/(b*d-a*e)+0))

Submission status: Wrong Answer

Solution code:
import sys
for e in sys.stdin:
    a, b, c, d, e, f = map(int, e.split())
    y=(c*d-a*f)/(b*d-a*e)
    x = (c-b*y)/a
    print (str(round(x, 3))+' '+str(round(y, 3)))

Submission status: Wrong Answer

Solution code:
import sys
for e in sys.stdin:
    a, b, c, d, e, f = map(int, e.split())
    y=(c*d-a*f)/(b*d-a*e)
    x = (c-b*y)/a
    print (str(round(x, 3))+" "+str(round(y, 3)))

Submission status: Wrong Answer

Solution code:
from sys import stdin
for line in stdin:
    a, b, c, d, e, f = map(float, line.split())
    print('%lf %lf' % ((c * e - f * b) / (a * e - b * d), (c * d - a * f) / (b * d - a * e)) )

Submission status: Wrong Answer

Solution code:
from sys import stdin
for line in stdin:
    a, b, c, d, e, f = map(float, line.split())
    print('%.3f %.3f' % ((c * e - f * b) / (a * e - b * d), (c * d - a * f) / (b * d - a * e)) )

Submission status: Wrong Answer

Solution code:
while True:
    try:
        a, b, c, d, e, f = map(float, input().split())
        x = (c*e - b*f)/(a*e - b*d)
        y = (a*f - c*d)/(a*e - b*d)
        print("{:.3f} {:.3f}".format(x, y))
    except:
        break

Submission status: Wrong Answer

Solution code:
while True:
	try:
		a,b,c,d,e,f = map(int, input().split())
		x = (c*d-a*f)/(b*d-a*e)
		print("{:.3f} {:.3f}".format(x,c-b*x/a))
	except:
		break

Submission status: Wrong Answer

Solution code:
while True:
	try:
		a,b,c,d,e,f = map(int, input().split())
		x = (c*d-a*f)/(b*d-a*e)
		print("{:.3f} {:.3f}".format(c-b*x/a, x))
	except:
		break

Submission status: Wrong Answer

Solution code:
while True:
    try:
        a,b,c,d,e,f = [int(x) for x in input().split()]
        x = (c*e-b*f)/(a*e-b*d)
        y = (c*d-a*f)/(b*d-a*e)
        print('{:.4f},{:.4f}'.format(x,y))
    except:
        break

Submission status: Wrong Answer

Solution code:
while True:
    try:
        a,b,c,d,e,f = [int(x) for x in input().split()]
        x = (c*e-b*f)/(a*e-b*d)
        y = (c*d-a*f)/(b*d-a*e)
        print('{:.3f},{:.3f}'.format(x,y))
    except:
        break

Submission status: Wrong Answer

Solution code:
while True:
    try:
        (a, b, e, c, d, f) = map(float, input().split())

        D = a * d - b * c
        x = (d * e - b * f) / D
        y = (a * f - c * e) / D

        if D == 0:
            x = 0.0
            y = 0.0

        print("{0:.3f} {1:.3f}".format(x, y))

    except EOFError:
        break

Submission status: Wrong Answer

Solution code:
while True:
	try:
		a,b,c,d,e,f=map(int,raw_input().split())
		y=(c*d-f*a)/(b*d-a*e)
		x=(c-b*y)/a
		print x,y
	except EOFError:
		break

Submission status: Wrong Answer

Solution code:
while True:
	try:
		a,b,c,d,e,f=map(int,raw_input().split())
		y=float((c*d-f*a)/(b*d-a*e))
		x=(c-b*y)/a
		print("{:.3f}".format(x)),("{:.3f}".format(y))
	except EOFError:
		break

Submission status: Wrong Answer

Solution code:
while True:
	try:
		a,b,c,d,e,f=map(int,raw_input().split())
		y=round( (c*d-f*a)/(b*d-a*e) ,3)
		x=round( (c-b*y)/a , 3)
		print("{:.3f}".format(x)),("{:.3f}".format(y))
	except EOFError:
		break

Submission status: Wrong Answer

Solution code:
import sys
for e in sys.stdin:
 a,b,c,d,e,f=map(int,e.split())
 y=(c*d-a*f)/(b*d-a*e)
 print(f'{(c-b*y)/a} {y}')

Submission status: Wrong Answer

Solution code:
import sys
for i in sys.stdin:
    a, b, c, d, e, f = map(int, i.split())
    print("{0:.3f} {1:.3f}".format(round((c * e - b * f) / (a * e - b * d), 3), round((c * d - a * f) / (b * d - a * e), 3)))

Submission status: Wrong Answer

Solution code:
import sys
for i in sys.stdin:
    a, b, c, d, e, f = map(int, i.split())
    x = (c * e - b * f) / (a * e - b * d)
    x = abs(x) if x < 10e-4 else x
    print("{:.3f} {:.3f}".format(x, (c - x) / b))

Submission status: Wrong Answer

Solution code:
import sys
for i in sys.stdin:
    a, b, c, d, e, f = map(int, i.split())
    x = (c * e - b * f) / (a * e - b * d)
    y = (c * d - a * f) / (b * d - a * e)
    x = abs(x) if x < 10e-4 else x
    y = abs(y) if y < 10e-4 else y
    print("{:.3f} {:.3f}".format(x, y))

Submission status: Wrong Answer

Solution code:
import sys
for i in sys.stdin:
    a, b, c, d, e, f = map(int, i.split())
    x = (c * e - b * f) / (a * e - b * d)
    y = (c * d - a * f) / (b * d - a * e)
    x = abs(x) if x < 10e-4 else x
    y = abs(y) if y < 10e-4 else y
    print("{:.3f} {:.3f}".format(round(x,3), round(y,3)))

Submission status: Wrong Answer

Solution code:
import sys
q=[list(map(float,line.split())) for line in sys.stdin]
for i in q:
    x=(i[4]*i[2]-i[1]*i[5])/(i[0]*i[4]-i[1]*i[3])
    y=(i[0]*i[5]-i[3]*i[2])/(i[0]*i[4]-i[1]*i[3])
    print("{:.3f} {:.3f}".format(x,y))

Submission status: Wrong Answer

Solution code:
# Vol0004.
import sys

def main():
    data = []
    lines = sys.stdin.readlines()

    for line in lines:
        data.append(line.split())  # スペース区切りで放り込む
    # ax + by = c, dx + ey = fの解は、
    # x = (ce - bf) / (ae - bd), y = (af - cd) / (ae - bd).
    # これをround(float, 3)すれば答えが出る。
    N = len(data)
    for i in range(N):
        for k in range(6):
            data[i][k] = int(data[i][k])
        det = data[i][0] * data[i][4] - data[i][1] * data[i][3]
        gx = data[i][2] * data[i][4] - data[i][1] * data[i][5]
        gy = data[i][0] * data[i][5] - data[i][2] * data[i][3]
        print(str(round(gx / det, 3)) + " " + str(round(gy / det, 3)))

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
# Vol0004.
import sys

def main():
    data = []
    lines = sys.stdin.readlines()

    for line in lines:
        data.append(line.split())  # スペース区切りで放り込む
    # ax + by = c, dx + ey = fの解は、
    # x = (ce - bf) / (ae - bd), y = (af - cd) / (ae - bd).
    # これをround(float, 3)すれば答えが出る。
    N = len(data)
    for i in range(N):
        for k in range(6):
            data[i][k] = int(data[i][k])
        det = data[i][0] * data[i][4] - data[i][1] * data[i][3]
        gx = data[i][2] * data[i][4] - data[i][1] * data[i][5]
        gy = data[i][0] * data[i][5] - data[i][2] * data[i][3]
        print("{0:.3f}".format(gx / det) + " " + "{0:.3f}".format(gy / det))

if __name__ == "__main__":
    main()

# 補足、0.1とか0.22でも3桁目まで表示しないとWrongになる。
# 表示するにはprint("{0:.nf}".format(数))ってやる(nのところは桁数)。

Submission status: Wrong Answer

Solution code:
def main():
    p = [float(x) for x in input().split()]
    x = (p[4]*p[2]-p[1]*p[5])/(p[0]*p[4]-p[1]*p[3])
    y = (p[2]-p[0]*x)/p[1]
    print("%.3f %.3f"%(x,y))

main()

Submission status: Wrong Answer

Solution code:
def main():
    p = [float(x) for x in input().split()]
    x = (p[4]*p[2]-p[1]*p[5])/(p[0]*p[4]-p[1]*p[3])
    y = (p[2]-p[0]*x)/p[1]
    if abs(x)<1e3:
        x=0.0
    if abs(y)<1e3:
        y=0.0
    print("%.3f %.3f"%(x,y))

main()

Submission status: Wrong Answer

Solution code:
def main():
    p = [float(x) for x in input().split()]
    x = (p[4]*p[2]-p[1]*p[5])/(p[0]*p[4]-p[1]*p[3])
    y = (p[2]-p[0]*x)/p[1]
    if abs(x)<1e-4:
        x=0.0
    if abs(y)<1e-4:
        y=0.0
    print("%.3f %.3f"%(x,y))

main()

Submission status: Wrong Answer

Solution code:
def main():
    p = [float(x) for x in input().split()]
    x = (p[4]*p[2]-p[1]*p[5])/(p[0]*p[4]-p[1]*p[3])
    y = (p[2]-p[0]*x)/p[1]
    if abs(x)<1e-4:
        x=0.0
    if abs(y)<1e-4:
        y=0.0
    print("{:.3f} {:.3f}".format(x,y))

main()

Submission status: Wrong Answer

Solution code:
for i in range(2):
    a,b,c,d,e,f = map(int,input().split(' '))
    print('{:.3f}'.format(round((c*e-b*f)/(b*d-a*e),3)),'{:.3f}'.format(round((c*e-b*f)/(b*d-a*e),3)))

Submission status: Wrong Answer

Solution code:
# AOJ 0004 Simultaneous Equation
# Python3 2018.6.9 bal4u

while True:
	try:
		a = list(map(float, input().split()))
		dd = a[0]*a[4]-a[3]*a[1]
		d1 = a[2]*a[4]-a[5]*a[1]
		d2 = a[0]*a[5]-a[3]*a[2]
		print("{0:.3f} {1:.3f}".format(d1/dd, d2/dd))
	except EOFError:
		break

Submission status: Wrong Answer

Solution code:
for i in range(2):
    a,b,c,d,e,f = [float(i) for i in input().split()]
    x = round((1/a)*(c-b*((a*f-c*d)/(a*e-b*d))),3)
    y = round((a*f-c*d)/(a*e-b*d),3)
    print(
        '{:.3f}'.format(x),'{:.3f}'.format(y),
    )

Submission status: Wrong Answer

Solution code:

def ans(a, b, c, d, e, f):
    x = ((e*c - b*f)/(a*e-b*d))
    y = ((-d*x + f)/e)
    x = "%.3f" % x
    y = "%.3f" % y


list = []
i = 0
k = 0
while True:
    try:
         list[i].append(list(map(int, input().split())))
         i += 1
    except:
        break

for i in range(len(list)):
    for s in list[i]:
        ans(s[0],s[1],s[2],s[3],s[4],s[5])
        print(ans)

Submission status: Wrong Answer

Solution code:
while True:
    try:
        a,b,c,d,e,f = map(int, input().split())
        x = (c*e - b*f)/(a*e - b*d)
        y = (a*f - c*d)/(a*e - b*d)
        print(x, y)
    except EOFError : break

Submission status: Wrong Answer

Solution code:
while True:
    try:
        a,b,c,d,e,f = map(int, input().split())
        x = (c*e - b*f)/(a*e - b*d)
        y = (a*f - c*d)/(a*e - b*d)
        print('{0:.3f} {0:.3f}'.format(x,y))
    except EOFError : break

Submission status: Wrong Answer

Solution code:
while True:
    try:
        a,b,c,d,e,f = map(int, input().split())
        x = (c*e - b*f)/(a*e - b*d)
        y = (a*f - c*d)/(a*e - b*d)
        print('{0:.3f}'.format(x) +' {0:.3f}'.format(y))
              
    except EOFError: break

Submission status: Wrong Answer

Solution code:
while True:
    try:
        a,b,c,d,e,f = map(int, input().split())
        x = (c*e - b*f)/(a*e - b*d)
        y = (a*f - c*d)/(a*e - b*d)
        print('{0:.3f}'.format(round(x)) +' {0:.3f}'.format(round(y)))
              
    except EOFError: break

Submission status: Wrong Answer

Solution code:
while True:
    try:
        a,b,c,d,e,f = map(int, input().split())
        c = (a*e - b*d) + 0.00001
        x = (c*e - b*f)/c
        y = (a*f - c*d)/c
        print('{0:.3f}'.format(x) +' {0:.3f}'.format(y))
              
    except EOFError: break

Submission status: Wrong Answer

Solution code:
while True:
    try:
        a,b,c,d,e,f = map(int, input().split())
        g = (a*e - b*d) + 0.0001
        x = (c*e - b*f)/g
        y = (a*f - c*d)/g
        print('{0:.3f}'.format(x) +' {0:.3f}'.format(y))
              
    except EOFError: break

Submission status: Wrong Answer

Solution code:
while True:
    try:
        a,b,c,d,e,f = map(int, input().split())
        g = (a*e - b*d) 
        x = (c*e - b*f)
        y = (a*f - c*d)
        print('{0:.3f}'.format(x/g+0.0001) +' {0:.3f}'.format(y/0.0001))
              
    except EOFError: break

Submission status: Wrong Answer

Solution code:
import sys;print'\n'.join('%.3f %.3f'%(lambda x:((x[2]*x[4]-x[1]*x[5])/(x[0]*x[4]-x[1]*x[3]),(x[0]*x[5]-x[2]*x[3])/(x[0]*x[4]-x[1]*x[3])))(map(int,s.split(' ')))for s in sys.stdin)

Submission status: Wrong Answer

Solution code:
import sys;print'\n'.join('%.3f %.3f'%(lambda x:(round((x[2]*x[4]-x[1]*x[5])/(x[0]*x[4]-x[1]*x[3])),round((x[0]*x[5]-x[2]*x[3])/(x[0]*x[4]-x[1]*x[3]))))(map(int,s.split(' ')))for s in sys.stdin)

Submission status: Wrong Answer

Solution code:
import sys;print'\n'.join('%.3f %.3f'%(lambda x:(round((x[2]*x[4]-x[1]*x[5])/float(x[0]*x[4]-x[1]*x[3]),3),round((x[0]*x[5]-x[2]*x[3])/float(x[0]*x[4]-x[1]*x[3]),3)))(map(int,s.split(' ')))for s in sys.stdin)

Submission status: Wrong Answer

Solution code:
while True:
    try:
        x = map(float, raw_input().split(" "))
        a = (x[2]*x[4]-x[1]*x[5])/(x[0]*x[4]-x[1]*x[3])
        b = (-x[3]*x[2]+x[0]*x[5])/(x[0]*x[4]-x[1]*x[3])
        
        print "%.3f %.3f" % (a, b)
    
    except EOFError:
        break

Submission status: Wrong Answer

Solution code:
while 1:
    try:
        line = raw_input()
    except EOFError:
        break
    a, b, c, d, e, f = map(int, line.split())
    inv_delta = a*e-b*d
    solve_a = (e*c-b*f) / inv_delta
    solve_b = (-d*c+a*f) / inv_delta
    print round(solve_a, 3), round(solve_b, 3)

Submission status: Wrong Answer

Solution code:
#coding:UTF-8

n = map(float, raw_input().split())
x = (n[2]*n[4] - n[5]*n[1]) / (n[0]*n[4] - n[3]*n[1])
y = (n[2]*n[3] - n[5]*n[0]) / (n[1]*n[3] - n[4]*n[0])

print str(x)+" "+str(y)

Submission status: Wrong Answer

Solution code:
#coding:UTF-8

n = map(float, raw_input().split())
x = (n[2]*n[4] - n[5]*n[1]) / (n[0]*n[4] - n[3]*n[1])
y = (n[2]*n[3] - n[5]*n[0]) / (n[1]*n[3] - n[4]*n[0])

if x==-0:
    x=0
if y==0:
    y=0

print str(x)+" "+str(y)

Submission status: Wrong Answer

Solution code:
#coding:UTF-8

n = map(float, raw_input().split())
x = (n[2]*n[4] - n[5]*n[1]) / (n[0]*n[4] - n[3]*n[1])
y = (n[2]*n[3] - n[5]*n[0]) / (n[1]*n[3] - n[4]*n[0])

if x==-0:
    x=0
if y==-0:
    y=0

print str(x)+" "+str(y)

Submission status: Wrong Answer

Solution code:
#coding:UTF-8

n = map(float, raw_input().split())
x = (n[2]*n[4] - n[5]*n[1]) / (n[0]*n[4] - n[3]*n[1])
y = (n[2]*n[3] - n[5]*n[0]) / (n[1]*n[3] - n[4]*n[0])

if x==-0:
    x=0
if y==-0:
    y=0

print "%f %f"%(x,y)

Submission status: Wrong Answer

Solution code:
#coding:UTF-8

n = map(float, raw_input().split())
x = (n[2]*n[4] - n[5]*n[1]) / (n[0]*n[4] - n[3]*n[1])
y = (n[2]*n[3] - n[5]*n[0]) / (n[1]*n[3] - n[4]*n[0])

if x==-0:
    x=0
if y==-0:
    y=0

print "%.3f %.3f"%(x,y)

Submission status: Wrong Answer

Solution code:
import sys
import math
for i in sys.stdin.readlines():
    a,b,p,c,d,q= map(int, i.split())
    print "{:.3f} {:.3f}".format((d*p-b*q)/(a*d-b*c),(-c*p+a*q)/(a*d-b*c))

Submission status: Wrong Answer

Solution code:
import sys
import math
for i in sys.stdin.readlines():
    a,b,p,c,d,q= map(int, i.split())
    print "{:.3f} {:.3f}".format(round((d*p-b*q)/(a*d-b*c),4),round((-c*p+a*q)/(a*d-b*c),4))

Submission status: Wrong Answer

Solution code:
import sys
import math
for i in sys.stdin.readlines():
    a,b,p,c,d,q= map(float, i.split())
    print "{:.3f} {:.3f}".format((d*p-b*q)/(a*d-b*c),(-c*p+a*q)/(a*d-b*c))

Submission status: Wrong Answer

Solution code:
def solve(a, b, c, d, e, f):
    agn = a*e - b*d
    x = (e*c - b*f)/float(agn)
    y = (-d*c + a*f)/float(agn)
    print "%.3f %.3f" % (x, y)
    
while 1:
    try:
        a,b,c,d,e,f = map(float, raw_input().split())
        solve(a,b,c,d,e,f)
    except EOFError:
        break

Submission status: Wrong Answer

Solution code:
#coding: utf-8
def solve(a, b, c, d, e, f):
    agn = a*e - b*d
    x = (e*c - b*f)/float(agn)
    y = (-d*c + a*f)/float(agn)
    print "%.3f %.3f" % (x, y)
    
while 1:
    try:
        a,b,c,d,e,f = map(float, raw_input().split())
        solve(a,b,c,d,e,f)
    except EOFError:
        break

Submission status: Wrong Answer

Solution code:
a,b,c,d,e,f = map(int,raw_input().split())
print (c*e-b*f)/(a*e-b*d),(a*f-c*d)/(a*e-b*d)

Submission status: Wrong Answer

Solution code:
a,b,c,d,e,f = map(int,raw_input().split())
print '%.3f %.3f' % ((c*e-b*f)/(a*e-b*d),(a*f-c*d)/(a*e-b*d))

Submission status: Wrong Answer

Solution code:
a,b,c,d,e,f = map(float,raw_input().split())
print '%.3f %.3f' % ((c*e-b*f)/(a*e-b*d),(a*f-c*d)/(a*e-b*d))

Submission status: Wrong Answer

Solution code:
a,b,c,d,e,f = map(float,raw_input().split())
lst = ((c*e-b*f)/(a*e-b*d),(a*f-c*d)/(a*e-b*d))
ans = []
if lst[0] == -0:
    ans.append(0)
else:
    ans.append(lst[0])
if lst[1] == -0:
    ans.append(0)
else:
    ans.append(lst[1])

print '%.3f %.3f' % (ans[0],ans[1])

Submission status: Wrong Answer

Solution code:
while True:
    try:
        a, b, c, d, e, f = map(float, raw_input().split())
    except EOFError:
        break
    x = (e * c - b * f) / (a * e - b * d)
    y = (-d * c + a * f) / (a * e - b * d)
    print x, y

Submission status: Wrong Answer

Solution code:
while True:
    try:
        a, b, c, d, e, f = map(float, raw_input().split())
    except EOFError:
        break
    x = (e * c - b * f) / (a * e - b * d)
    y = (-d * c + a * f) / (a * e - b * d)
    print '%.3f %.3f' % (x, y)

Submission status: Wrong Answer

Solution code:
from __future__ import (division, absolute_import, print_function,  unicode_literals)
import sys

for line in sys.stdin:
    a, b, c, d, e, f = (float(n) for n in line.split())
    x = round((e * c - b * f) / (a * e - b * d), 4)
    y = round((a * f - c * d) / (a * e - b * d), 4)
    print('{:.3f} {:.3f}'.format(x, y))

Submission status: Wrong Answer

Solution code:
import sys
for r in iter(sys.stdin.readline,""):a,b,c,d,e,f=map(float,r.split());g=a*e-b*d;print "%.3f %.3f"%((c*e-b*f)/g,(a*f-c*d)/g)

Submission status: Wrong Answer

Solution code:
import sys
for r in iter(sys.stdin.readline,""):a,b,c,d,e,f=map(float,r.split());g=a*e-b*d;print round((c*e-b*f)/g),round((a*f-c*d)/g)

Submission status: Wrong Answer

Solution code:
try:
 for r in iter(raw_input,0):a,b,c,d,e,f=map(float,r.split());g=a*e-b*d;print "%.3f %.3f"%(round((c*e-b*f)/g+1e-9),round((a*f-c*d)/g+1e-9))
except:pass

Submission status: Wrong Answer

Solution code:
while True:
	try:
		a,b,c,d,e,f = map(float,raw_input().split(' '))
		print (c*e-b*f)/(a*e-b*d),(a*f-c*d)/(a*e-b*d)
	except: break

Submission status: Wrong Answer

Solution code:
while True:
	try:
		a,b,c,d,e,f = map(float,raw_input().split(' '))
		p = (c*e-b*f)/(a*e-b*d)
		q = (a*f-c*d)/(a*e-b*d)
		x = '%.3f' % p
		y = '%.3f' % q
		print x,y
	except: break

Submission status: Wrong Answer

Solution code:
while True:
	try:
		a,b,c,d,e,f = map(float,raw_input().split(' '))
		p = round((c*e-b*f)/(a*e-b*d),4)
		q = round((a*f-c*d)/(a*e-b*d),4)
		x = '%.3f' % p
		y = '%.3f' % q
		print x,y
	except: break

Submission status: Wrong Answer

Solution code:
while True:
	try:
		a,b,c,d,e,f = map(float,raw_input().split(' '))
		p = round((c*e-b*f)/(a*e-b*d),4)
		q = round((a*f-c*d)/(a*e-b*d),4)
		x = '%.3f' % p
		y = '%.3f' % q
		if x == -0.000: x = 0.000
		if y == -0.000: y = 0.000
		print x,y
	except: break

Submission status: Wrong Answer

Solution code:
import sys
for line in sys.stdin:
    [a,b,c,d,e,f] = [float(x) for x in line.split()]
    print "%.3f %.3f" % ((f-(c/b*e))/(d-(a/b*e)),(f-(c/a*d))/(e-(b/a*d)))