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:
# ????????£???????¨????????§£???????????°??????
# ax + by = c
# dx + ey = f
import sys

def inverse(a, b, d, e):
    deta = a * e - b * d
    return (deta, e, -b, -d, a)

while True:
    data = sys.stdin.readline()
    if data is None or data.strip() == '':
        break
    data = data.strip().split(' ')
    print('data:%s' % data)
    a, b, c, d, e, f = [float(i) for i in data]

    inv = inverse(a, b, d, e)
    print('inv:', inv)
    x = (inv[1] * c + inv[2] * f) / inv[0]
    y = (inv[3] * c + inv[4] * f) / inv[0]

    print('%.4f %.4f' % (x, y))

Submission status: Wrong Answer

Solution code:
# ????????£???????¨????????§£???????????°??????
# ax + by = c
# dx + ey = f
import sys

def inverse(a, b, d, e):
    deta = a * e - b * d
    return (deta, e, -b, -d, a)

while True:
    data = sys.stdin.readline()
    if data is None or data.strip() == '':
        break
    data = data.strip().split(' ')
    a, b, c, d, e, f = [float(i) for i in data]

    inv = inverse(a, b, d, e)
    x = (inv[1] * c + inv[2] * f) / inv[0]
    y = (inv[3] * c + inv[4] * f) / inv[0]

    print('%.4f %.4f' % (x, y))

Submission status: Wrong Answer

Solution code:
# ????????£???????¨????????§£???????????°??????
# ax + by = c
# dx + ey = f
import sys

def inverse(a, b, d, e):
    deta = a * e - b * d
    return (deta, e, -b, -d, a)

while True:
    data = sys.stdin.readline()
    if data is None or data.strip() == '':
        break
    data = data.strip().split(' ')
    a, b, c, d, e, f = [float(i) for i in data]

    inv = inverse(a, b, d, e)
    x = (inv[1] * c + inv[2] * f) / inv[0]
    y = (inv[3] * c + inv[4] * f) / inv[0]

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

Submission status: Wrong Answer

Solution code:
for i in range(2):
  inl=map(int, raw_input().split())
  x=(inl[2]*inl[4]-inl[5]*inl[1])/(inl[0]*inl[4]-inl[3]*inl[1])+0.000
  y=(inl[2]*inl[3]-inl[5]*inl[0])/(inl[1]*inl[3]-inl[4]*inl[0])+0.000
  print x,y

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Here your code !
#import math

x=2*[0.0]

for i in range(2):
    a,b,c,d,e,f = list(map(float, input().split()))

    if abs(a)<1e-9 :
        x[0] = (b*f - e*c)/b*d
        x[1] = c/b
    
    elif abs(b)<1e-9 :
        x[0] = c/a
        x[1] = (a*f - d*c)/a*e
        
    elif abs(d)<1e-9 :
        x[0] = (a*c - f*b)/a*e
        x[1] = f/e
        
    elif abs(e)<1e-9 :
        x[0] = f/d
        x[1] = (c*d - f*a)/b*d
    
    else:
        x[0] = (b*f - e*c)/(b*d - a*e)
        x[1] = (c - a*x[0])/b
        
    print("%.3f %.3f"%(round(x[0],3), round(x[1],3)))

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Here your code !
#import math

x=2*[0.0]

#for i in range(2):
a,b,c,d,e,f = list(map(float, input().split()))

if abs(a)<1e-9 :
    x[0] = (b*f - e*c)/b*d
    x[1] = c/b

elif abs(b)<1e-9 :
    x[0] = c/a
    x[1] = (a*f - d*c)/a*e
    
elif abs(d)<1e-9 :
    x[0] = (a*c - f*b)/a*e
    x[1] = f/e
    
elif abs(e)<1e-9 :
    x[0] = f/d
    x[1] = (c*d - f*a)/b*d

else:
    x[0] = (b*f - e*c)/(b*d - a*e)
    x[1] = (c - a*x[0])/b
    
print("%.3f %.3f"%(round(x[0],3), round(x[1],3)))

Submission status: Wrong Answer

Solution code:
import sys

for line in sys.stdin:
    array = [int(x) for x in line.split()]
    ar1 = array[0:3]
    ar2 = array[3:]
    i = ar1[0]
    ar1 = [x*ar2[0] for x in ar1]
    ar2 = [x*i for x in ar2]
    y = (ar1[2] - ar2[2])/(ar1[1]-ar2[1])
    ar1 = array[0:3]
    x = (ar1[2]-ar1[1]*y)/ar1[0]
    print("%f %f" % (x,y))

Submission status: Wrong Answer

Solution code:
import sys

for line in sys.stdin:
    array = [int(x) for x in line.split()]
    ar1 = array[0:3]
    ar2 = array[3:]
    i = ar1[0]
    ar1 = [x*ar2[0] for x in ar1]
    ar2 = [x*i for x in ar2]
    y = (ar1[2] - ar2[2])/(ar1[1]-ar2[1])
    ar1 = array[0:3]
    x = (ar1[2]-ar1[1]*y)/ar1[0]
    print("%d %d" % (x,y))

Submission status: Wrong Answer

Solution code:
import sys

for line in sys.stdin:
    array = [int(x) for x in line.split()]
    ar1 = array[0:3]
    ar2 = array[3:]
    i = ar1[0]
    ar1 = [x*ar2[0] for x in ar1]
    ar2 = [x*i for x in ar2]
    y = (ar1[2] - ar2[2])/(ar1[1]-ar2[1])
    ar1 = array[0:3]
    x = (ar1[2]-ar1[1]*y)/ar1[0]
    print(str(x) + ' ' + str(y))

Submission status: Wrong Answer

Solution code:
import sys

for line in sys.stdin:
    array = [int(x) for x in line.split()]
    ar1 = array[0:3]
    ar2 = array[3:]
    i = ar1[0]
    ar1 = [x*ar2[0] for x in ar1]
    ar2 = [x*i for x in ar2]
    y = (ar1[2] - ar2[2])/(ar1[1]-ar2[1])
    ar1 = array[0:3]
    x = (ar1[2]-ar1[1]*y)/ar1[0]
    print(str(round(x,3)) + ' ' + str(round(y,3)))

Submission status: Wrong Answer

Solution code:
import sys

for line in sys.stdin:
    array = [float(x) for x in line.split()]
    ar1 = array[0:3]
    ar2 = array[3:]
    i = ar1[0]
    ar1 = [x*ar2[0] for x in ar1]
    ar2 = [x*i for x in ar2]
    y = (ar1[2] - ar2[2])/(ar1[1]-ar2[1])
    ar1 = array[0:3]
    x = (ar1[2]-ar1[1]*y)/ar1[0]
    print(str(round(x,3)) + ' ' +  str(round(y,3)))

Submission status: Wrong Answer

Solution code:
import sys

for line in sys.stdin:
    array = [float(x) for x in line.split()]
    ar1 = array[0:3]
    ar2 = array[3:]
    i = ar1[0]
    ar1 = [x*ar2[0] for x in ar1]
    ar2 = [x*i for x in ar2]
    y = (ar1[2] - ar2[2])/(ar1[1]-ar2[1])
    ar1 = array[0:3]
    x = (ar1[2]-ar1[1]*y)/ar1[0]
    if (x - int(x)) == 0 and (y - int(y)) == 0:
        print(str(round(x,3)) + '00 ' +  str(round(y,3)) + '00')
    elif (x - int(x)) == 0:
        print(str(round(x,3)) + '00 ' +  str(round(y,3)))
    elif (x - int(x)) == 0 and (y - int(y)) == 0:
        print(str(round(x,3)) + ' ' +  str(round(y,3)) + '00')
    else:
        print(str(round(x,3)) + ' ' +  str(round(y,3)))

Submission status: Wrong Answer

Solution code:
import sys
L = sys.stdin.readlines()
for line in L:
	A = line.split()
	a, b, c, d, e, f = [float(A[i]) for i in range(6)]
	x = (b * f - c * e) / (b * d - a * e)
	y = (c * d - a * f) / (b * d - a * e)
	print("{:.3f}, {:.3f}".format(x, y))

Submission status: Wrong Answer

Solution code:
import sys
L = sys.stdin.readlines()
for line in L:
	A = line.split()
	a, b, c, d, e, f = [float(A[i]) for i in range(6)]
	x = (b * f - c * e) / (b * d - a * e)
	y = (c * d - a * f) / (b * d - a * e)
	print("{:.3f}, {:.3f}".format(x+0, y+0))

Submission status: Wrong Answer

Solution code:
import sys
L = sys.stdin.readlines()
for line in L:
	A = line.split()
	a, b, c, d, e, f = [float(A[i]) for i in range(6)]
	x = (b * f - c * e) / (b * d - a * e)
	y = (c * d - a * f) / (b * d - a * e)
	if x == 0:
		x = 0
	print("{:.3f}, {:.3f}".format(x+0, y+0))

Submission status: Wrong Answer

Solution code:
import sys
L = sys.stdin.readlines()
for line in L:
	A = line.split()
	a, b, c, d, e, f = [int(A[i]) for i in range(6)]
	x = (b * f - c * e) / (b * d - a * e)
	y = (c * d - a * f) / (b * d - a * e)
	print("{:.3f}, {:.3f}".format(x+0, y+0))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# input
inputs = []
while True:
  try:
    inputs.append(list(map(float,input().split())))
  except EOFError:
    break

# calculation
for i in inputs:
  x=(i[2]*i[4]-i[1]*i[5])/(i[0]*i[4]-i[1]*i[3])
  y=(i[0]*i[5]-i[2]*i[3])/(i[0]*i[4]-i[1]*i[3])
  print("{0:.3f} {1:.3f}".format(x,y))

Submission status: Wrong Answer

Solution code:
inputs = []
while True:
  try:
    inputs.append(list(map(float,input().split())))
  except EOFError:
    break

for i in inputs:
  x=(i[2]*i[4]-i[1]*i[5])/(i[0]*i[4]-i[1]*i[3])
  y=(i[0]*i[5]-i[2]*i[3])/(i[0]*i[4]-i[1]*i[3])
  print("{0:.3f} {1:.3f}".format(x,y))

Submission status: Wrong Answer

Solution code:
import sys
[print("{: .3f} {: .3f}".format((x[4] * x[2] - 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]))) for x in [[float(y) for y in x.split()] for x in sys.stdin]]

Submission status: Wrong Answer

Solution code:
import sys
[print(" ".join(["{: .3f}".format(y).strip() for y in [(x[4] * x[2] - 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])]])) for x in [[float(y) for y in x.split()] for x in sys.stdin]]

Submission status: Wrong Answer

Solution code:
import sys
[print("{0[0]:.3f} {0[1]:.3f}".format([round(y, 3) for y in [(x[4] * x[2] - 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])]])) for x in [[float(y) for y in x.split()] for x in sys.stdin]]

Submission status: Wrong Answer

Solution code:
[print("{0:.3f} {1:.3f}".format(
	(k[2] - k[1] * ((k[0] * k[5] - k[2] * k[3]) / (k[0] * k[4] - k[1] * k[3]))) / k[0],
	((k[0] * k[5] - k[2] * k[3]) / (k[0] * k[4] - k[1] * k[3])))
) for i in ["1 2 3 4 5 6", "2 -1 -2 -1 -1 -5"] for k in [[int(float(j)) for j in i.split()]]]

Submission status: Wrong Answer

Solution code:
while True:
    try:
        a, b, c, d, e, f = map(int, input().split())
        tb, tc = d*b, d*c
        te, tf = a*e, a*f
        y = (tc-tf)//(tb-te)
        x = (c-(y*b))//a
        print("{0:.3f} {1:.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())
        tb, tc = d*b, d*c
        te, tf = a*e, a*f
        y = (tc-tf)//(tb-te)
        x = (c-(y*b))//a
        print("{0:.3f} {1:.3f}".format(x+0, y+0))

    except:
        break

Submission status: Wrong Answer

Solution code:
while True:
    try:
        a, b, c, d, e, f = map(int, input().split())
        tb, tc = d*b, d*c
        te, tf = a*e, a*f
        y = (tc-tf)//(tb-te)
        x = (c-(y*b))//a
        print("{:.3f} {:.3f}".format(x+0, y+0))

    except:
        break

Submission status: Wrong Answer

Solution code:
while True:
    try:
        a, b, c, d, e, f = map(int, input().split())
        if ((a*e-b*d)!=0):
            tb, tc = d*b, d*c
            te, tf = a*e, a*f
            y = (tc-tf)//(tb-te)
            x = (c-(y*b))//a
        print("{:.3f} {:.3f}".format(x, y))

    except:
        break

Submission status: Wrong Answer

Solution code:
import sys 

for line in sys.stdin:
    [a,b,e,c,d,f] = [int(x) for x in line.split()]
    delta = a*d-b*c
    x = (d*e-b*f)/delta
    y = (-e*c+a*f)/delta
    print x,y

Submission status: Wrong Answer

Solution code:
import sys 

for line in sys.stdin:
    [a,b,e,c,d,f] = [int(x) for x in line.split()]
    delta = a*d-b*c
    x = (d*e-b*f)/delta
    y = (-e*c+a*f)/delta
    print round(x,4),round(y,4)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#coding: utf-8

import sys

for line in sys.stdin:
    l = (map(int,line.split()))
    a, b, c, d, e, f = l
    x = float(c*e - b*f) / float(a*e - b*d)
    y = float(c*d - a*f) / float(b*d - a*e)
    print round(x,3),round(y,3)

Submission status: Wrong Answer

Solution code:
#coding: utf-8

import sys

for line in sys.stdin:
    l = (map(int,line.split()))
    a, b, c, d, e, f = l
    x = float(c*e - b*f) / float(a*e - b*d)
    y = float(c*d - a*f) / float(b*d - a*e)
    print "%.3f" %x , "%.3f" %y

Submission status: Wrong Answer

Solution code:
#coding: utf-8

import sys

for line in sys.stdin:
    l = (map(float,line.split()))
    a, b, c, d, e, f = l
    x = float(c*e - b*f) / float(a*e - b*d)
    y = float(c*d - a*f) / float(b*d - a*e)
    print "%.3f" %x , "%.3f" %y

Submission status: Wrong Answer

Solution code:
#coding: utf-8

import sys

for line in sys.stdin:
    l = (map(float,line.split()))
    a = l[0]
    b = l[1]
    c = l[2]
    d = l[3]
    e = l[4]
    f = l[5]
    x = float(c*e - b*f) / float(a*e - b*d)
    y = float(c*d - a*f) / float(b*d - a*e)
    print "%.3f" %x , "%.3f" %y

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
from math import fabs


if __name__ == '__main__':
    epsilon = 1e-10
    # ??????????????\?????¨???????????????
    for line in sys.stdin:
        a, b, e, c, d, f = [int(x) for x in line.strip().split(' ')]
        x = 1/(a*d-b*c) * (d*e - b*f)
        y = 1/(a*d-b*c) * (-c*e + a*f)
        # ?¨????????????¨?????? -0.0 ???????????´???????????¶?????? 0.0 ?????????
        if fabs(x) < epsilon:
            x = 0.0
        if fabs(y) < epsilon:
            y = 0.0
        print('{0:.3f}, {1:.3f}'.format(x, y))

Submission status: Wrong Answer

Solution code:
import sys
from math import fabs


if __name__ == '__main__':
    epsilon = 1e-8
    # ??????????????\?????¨???????????????
    for line in sys.stdin:
        a, b, e, c, d, f = [int(x) for x in line.strip().split(' ')]
        x = 1/(a*d-b*c) * (d*e - b*f)
        y = 1/(a*d-b*c) * (-c*e + a*f)
        # ?¨????????????¨?????? -0.0 ???????????´???????????¶?????? 0.0 ?????????
        #if fabs(x) < epsilon:
        #    x = 0.0
        #if fabs(y) < epsilon:
        #    y = 0.0
        print('{0:.3f}, {1:.3f}'.format(x+0.0, y+0.0))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# -*- coding:utf-8 -*-

import sys

def solve_eq(a,b,c,d,e,f):
    x = ((e*c)-(b*f))/((a*e)-(b*d))
    y = ((a*f)-(c*d))/((a*e)-(b*d))
    sol = [x,y]
    return sol

array = []
for i in sys.stdin:
    array.append(i)

a = [0]*6
for i in range(len(array)):
    x = array[i].split()
    for i in range(len(x)):
        a[i] = float(x[i])

    ans = solve_eq(a[0],a[1],a[2],a[3],a[4],a[5])
    print("{0:0.3f}".format(ans[0]), "{0:0.3f}".format(ans[1]))

Submission status: Wrong Answer

Solution code:
def jisuan(lis):
    ns = lis.split(" ")
    for i in range(6):
        ns[i] = float(ns[i])
    a, b, c, d, e, f = ns[0], ns[1], ns[2], ns[3], ns[4], ns[5]
    x = (c * e - b * f) / (a * e - b * d)
    y = (c * d - a * f) / (b * d - a * e)
    return [x, y]

while 1:
    try:
        inpu = str(input())
    except:
        break

nums = inpu.split("\n")
for l in range(len(nums)):
    k0 = jisuan("1 2 3 4 5 6")[0]
    k1 = jisuan("1 2 3 4 5 6")[1]
    print("%.3f" % k0, "%.3f" % k1)

Submission status: Wrong Answer

Solution code:
def jisuan(lis):
    ns = lis.split(" ")
    for i in range(6):
        ns[i] = float(ns[i])
    a, b, c, d, e, f = ns[0], ns[1], ns[2], ns[3], ns[4], ns[5]
    x = (c * e - b * f) / (a * e - b * d)
    y = (c * d - a * f) / (b * d - a * e)
    return [x, y]


inpu = str(input())
nums = inpu.split("\n")
for l in range(len(nums)):
    k0 = jisuan("1 2 3 4 5 6")[0]
    k1 = jisuan("1 2 3 4 5 6")[1]
    print("%.3f" % k0, "%.3f" % k1)

Submission status: Wrong Answer

Solution code:
def jisuan(lis):
    ns = lis.split(" ")
    for i in range(6):
        ns[i] = float(ns[i])
    a, b, c, d, e, f = ns[0], ns[1], ns[2], ns[3], ns[4], ns[5]
    x = (c * e - b * f) / (a * e - b * d)
    y = (c * d - a * f) / (b * d - a * e)
    return [x, y]


inpu = str(input())
nums = inpu.split("\n")
for l in range(len(nums)):
    k0 = jisuan(nums[l])[0]
    k1 = jisuan(nums[l])[1]
    print("%.3f" % k0, "%.3f" % k1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
try:
    while 1:
        a, b, c, d, e, f = list(map(int, input().split()))
        s = (a*e-b*d)
        x = e * c - b * f
        y = -c * d + a * f

        print(x/s, y/s)
except:
    pass

Submission status: Wrong Answer

Solution code:
import sys

nums = []


for line in sys.stdin:
    nums.append(line)

for i in range(len(nums)):
    input_line = nums[i].split(" ")
    a = float(input_line[0])
    b = float(input_line[1])
    c = float(input_line[2])
    d = float(input_line[3])
    e = float(input_line[4])
    f = float(input_line[5])

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

    
    x_out = round(x,3)
    if int(x_out) == 0:
        x_out = 0
    
    y_out = round(y,3)
    if int(y_out) == 0:
        y_out = 0
    
    print("{0:.3f}".format(x_out) + " " + "{0:.3f}".format(y_out))

Submission status: Wrong Answer

Solution code:
for i in range(2):
    k = list(map(float,input().split()))
    n = k[0]*k[4] -k[1]*k[3]
    x,y = (k[4]*k[2]-k[1]*k[5])/n,(-k[3]*k[2]+k[0]*k[5])/n
    if x == 0:
        x = 0
    if y == 0:
        y = 0
    print("{0:0.3f} {1:0.3f}".format(x,y))

Submission status: Wrong Answer

Solution code:

for i in range(2):
    k = list(map(float,input().split()))
    n = k[0]*k[4] -k[1]*k[3]
    x,y = round((k[4]*k[2]-k[1]*k[5])/n,4),round((-k[3]*k[2]+k[0]*k[5])/n,4)
    if x == 0:
        x = 0
    if y == 0:
        y = 0
    print("{0:0.3f} {1:0.3f}".format(x,y))

Submission status: Wrong Answer

Solution code:
x,y = [0]*2,[0]*2
for i in range(2):
    k = list(map(float,input().split()))
    n = k[0]*k[4] -k[1]*k[3]

    x[i],y[i] = (k[4]*k[2]-k[1]*k[5])/n,(-k[3]*k[2]+k[0]*k[5])/n    
    if x == 0:
        x = 0
    if y == 0:
        y = 0
for i in range(2):
    print("{0:0.3f} {1:0.3f}".format(x[i],y[i]))

Submission status: Wrong Answer

Solution code:
x,y = [0]*2,[0]*2
for i in range(2):
    k = list(map(float,input().split()))
    n = k[0]*k[4] -k[1]*k[3]

    x[i],y[i] = (k[4]*k[2]-k[1]*k[5])/n,(-k[3]*k[2]+k[0]*k[5])/n    
    if x == -0:
        x = 0
    if y == -0:
        y = 0
for i in range(2):
    print("{0:0.3f}".format(x[i]),"{0:0.3f}".format(y[i]))

Submission status: Wrong Answer

Solution code:
x,y = [0]*2,[0]*2
for i in range(2):
    k = list(map(float,input().split()))
    n = k[0]*k[4] -k[1]*k[3]
    x[i] = round((k[4]*k[2]-k[1]*k[5])/n,3)
    y[i] = round((-k[3]*k[2]+k[0]*k[5])/n,3)
    if x == -0:
        x = 0
    if y == -0:
        y = 0
for i in range(2):
    print("{0:.3f}".format(x[i]),"{0:.3f}".format(y[i]))

Submission status: Wrong Answer

Solution code:
for i in range(2):
    k = list(map(float,input().split()))
    n = k[0]*k[4] -k[1]*k[3]
    x = round((k[4]*k[2]-k[1]*k[5])/n,3)
    y = round((-k[3]*k[2]+k[0]*k[5])/n,3)
    if x == -0:
        x = 0
    if y == -0:
        y = 0
    print("{0:.3f}".format(x),"{0:.3f}".format(y))

Submission status: Wrong Answer

Solution code:
for i in range(2):
    a,b,c,d,e,f = map(float,input().split())
    n = a*e-b*d
    x = round((e*c-b*f)/n,3)
    y = round((a*f-d*c)/n,3)
    if x == -0:
        x = 0
    if y == -0:
        y = 0
    print("{0:.3f}".format(x),"{0:.3f}".format(y))

Submission status: Wrong Answer

Solution code:
for i in range(2):
    a,b,c,d,e,f = map(float,input().split())
    n = a*e-b*d
    print(n)
    x = round((e*c-b*f)/n,4)
    y = round((a*f-d*c)/n,4)
    if x == -0:
        x = 0
    if y == -0:
        y = 0
    print("{0:.3f}".format(x),"{0:.3f}".format(y))

Submission status: Wrong Answer

Solution code:
ini=map(int, raw_input().split())

x=(ini[2]*ini[4]-ini[1]*ini[5])/(ini[0]*ini[4]-ini[1]*ini[3])*1.0
y=(ini[2]*ini[3]-ini[0]*ini[5])/(ini[1]*ini[3]-ini[0]*ini[4])*1.0

xx=round(x,3)
yy=round(y,3)

xxx=('%4.3f' % xx)
yyy=('%4.3f' % yy)

print xxx,yyy

Submission status: Wrong Answer

Solution code:
import sys

a=[]
for i in sys.stdin:
    a.append(i)

for j in a:
    ini=map(int, j.split())

    x=(ini[2]*ini[4]-ini[1]*ini[5])/(ini[0]*ini[4]-ini[1]*ini[3])*1.0
    y=(ini[2]*ini[3]-ini[0]*ini[5])/(ini[1]*ini[3]-ini[0]*ini[4])*1.0

    xx=round(x,3)
    yy=round(y,3)

    xxx=('%4.3f' % xx)
    yyy=('%4.3f' % yy)

    print xxx,yyy

Submission status: Wrong Answer

Solution code:
import sys

a=[]
for i in sys.stdin:
    a.append(i)

for j in a:
    ini=map(int, j.split())

    x=(ini[2]*ini[4]-ini[1]*ini[5])/(ini[0]*ini[4]-ini[1]*ini[3])*1.0
    y=(ini[2]*ini[3]-ini[0]*ini[5])/(ini[1]*ini[3]-ini[0]*ini[4])*1.0

    xx=round(x,3)
    yy=round(y,3)

    xxx=('%3.3f' % xx)
    yyy=('%3.3f' % yy)

    print xxx,yyy

Submission status: Wrong Answer

Solution code:
import sys

a=[]
for i in sys.stdin:
    a.append(i)

for j in a:
    ini=map(int, j.split())

    x=(ini[2]*ini[4]-ini[1]*ini[5])*1.0/(ini[0]*ini[4]-ini[1]*ini[3])*1.0
    y=(ini[2]*ini[3]-ini[0]*ini[5])*1.0/(ini[1]*ini[3]-ini[0]*ini[4])*1.0

    xx=round(x,3)
    yy=round(y,3)

    xxx=('%3.3f' % xx)
    yyy=('%3.3f' % yy)

    print xxx,yyy

Submission status: Wrong Answer

Solution code:
lines = []
while 1:
    try:
        lines.append(input())
    except EOFError:
        break

for l in lines:
    print(l)

Submission status: Wrong Answer

Solution code:
import sys

lines = sys.stdin.readlines()
for line in lines:
    a, b, c, d, e, f = map(float, line.split())
    A = a * e - b * d
    if A == 0:
        break;
    x = (c * e - b * f) / A
    y = (a * f - c * d) / A
    print("%.3f %.3f" %(x,y))

Submission status: Wrong Answer

Solution code:
#_*_ coding:utf-8 _*_
import sys


while True:
    vals = sys.stdin.readline()
    if(vals is  None or vals.strip() == '' ):
        break
    a,b,c,d,e,f=list( map(float,vals.strip().split()))
    temp = a * e - d * b
    print(temp)
    x = (c * e - b * f) / temp + 0.0
    y = (c * d - a * f) / -temp + 0.0
    print('%.3f %.3f' % (x,y))

Submission status: Wrong Answer

Solution code:
import sys
import random
for s in sys.stdin:
    a,b,c,d,e,f = map(float, s.split())
    x = (e*c-b*f)/(a*e-b*d)
    y = (a*f-d*c)/(a*e-b*d)
    print('{0:.3f} {1:.3f}'.format(x, y))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-

import sys
import os

for s in sys.stdin:
    a, b, c, d, e, f = list(map(int, s.split()))

    delta = a * e - b * d
    x = 1 / delta * (e * c - b * f)
    y = 1 / delta * (-d * c + a * f)
    print(x, y)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-

import sys
import os


for s in sys.stdin:
    a, b, c, d, e, f = list(map(int, s.split()))

    delta = a * e - b * d
    x = 1 / delta * (e * c - b * f)
    y = 1 / delta * (-d * c + a * f)
    print(x, y)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-

import sys
import os


for s in sys.stdin:
    a, b, c, d, e, f = list(map(int, s.split()))

    delta = a * e - b * d
    x = 1 / delta * (e * c - b * f)
    y = 1 / delta * (-d * c + a * f)
    print('{:.3f} {:.3f}'.format(x, y))

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-

import sys
import os


for s in sys.stdin:
    a, b, c, d, e, f = list(map(int, s.split()))

    delta = a * e - b * d
    if delta == 0:
        break
    else:
        x = 1 / delta * (e * c - b * f)
        y = 1 / delta * (-d * c + a * f)
        print('{:.3f} {:.3f}'.format(x, y))

Submission status: Wrong Answer

Solution code:
def my_func(a):
	ans1=(a[2]*a[4]-a[1]*a[5])/(a[0]*a[4]-a[1]*a[3])
	ans2=(-a[3]*a[2]+a[0]*a[5])/(a[0]*a[4]-a[1]*a[3])
	print ans1,ans2
while True:
	try:
		splited = map(float, raw_input().split())
		my_func(splited)
	except EOFError:
		break

Submission status: Wrong Answer

Solution code:
def mul4(v1, v2, v3, v4):
    return (v1 * v2) - (v3 * v4)

for d in [input().split() for _ in range(2)]:
    a, b, e, c, d, f = tuple(map(float, d))
    det = mul4(a, d, c, b)
    print("{:.3f} {:.3f}".format(
        mul4(d, e, b, f) / det or 0.0,
        -mul4(c, e, a, f) / det or 0.0)
    )

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys

for line in sys.stdin:
    nums = line.split(" ")
    a, b, e, c, d, f = int(nums[0]),int(nums[1]),int(nums[2]),int(nums[3]),int(nums[4]),int(nums[5])
    print('{0:.3f} {1:.3f}'.format((e*d-b*f)/(a*d-b*c), (a*f-e*c)/(a*d-b*c)))

Submission status: Wrong Answer

Solution code:
import sys

for line in sys.stdin:
    nums = line.split(" ")
    a, b, e, c, d, f = int(nums[0]),int(nums[1]),int(nums[2]),int(nums[3]),int(nums[4]),int(nums[5])
    print('{0:.3f} {1:.3f}'.format(round((e*d-b*f)/(a*d-b*c),3), round((a*f-e*c)/(a*d-b*c),3)))

Submission status: Wrong Answer

Solution code:
import sys

for line in sys.stdin:
    nums = line.split(" ")
    a, b, e, c, d, f = int(nums[0]),int(nums[1]),int(nums[2]),int(nums[3]),int(nums[4]),int(nums[5])
    print('{0:.3f} {1:.3f}'.format(round((e*d-b*f)/(a*d-b*c),4), round((a*f-e*c)/(a*d-b*c),4)))

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Here your code !
import sys

for line in sys.stdin:
    nums = line.split(" ")
    a, b, e, c, d, f = int(nums[0]),int(nums[1]),int(nums[2]),int(nums[3]),int(nums[4]),int(nums[5])
    print('{0:.3f} {1:.3f}'.format(round((e*d-b*f)/(a*d-b*c),4), round((a*f-e*c)/(a*d-b*c),4)))

Submission status: Wrong Answer

Solution code:
def main():
    def get_inputs():
        li = []
        try:
            while True:
                li.append(input())
        except EOFError:
            return li

    li = get_inputs()
    for str_num in li:
        tmp = str_num.split(" ")
        for i in range(len(tmp)):
            tmp[i] = int(tmp[i])
        a,b,c,d,e,f = tmp[0],tmp[1],tmp[2],tmp[3],tmp[4],tmp[5]
        x = (c*e - b*f) / (a*e - b*d)
        x = round(x, 3)
        y = (c*d - a*f) / (b*d - a*e)
        y = round(y, 3)
        print("{} {}".format(x,y))
    return None


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import sys

while True:
    line = sys.stdin.readline()
    if not line:
        break
    a,b,c,d,e,f = map(int, line.rstrip().split(' '))
    x = (f - c*e/b)/(d - a*e/b)
    y = (f - d*c/a)/(e - b*d/a)
    print("{:.3f} {:.3f}".format(round(x,3),round(y,3)))

Submission status: Wrong Answer

Solution code:
import sys

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

Submission status: Wrong Answer

Solution code:
import sys

for line in sys.stdin:
    try:
        a,b,c,d,e,f = map(float, line.rstrip().split(' '))
        x = round((b*f-c*e)/(b*d-a*e), 3)
        y = round((a*f-d*c)/(a*e-b*d), 3)
        print("{:.3f} {:.3f}".format(x,y))
    except:
        break

Submission status: Wrong Answer

Solution code:
import sys

for line in sys.stdin:
    try:
        a,b,c,d,e,f = map(float, line.rstrip().split(' '))
        x = (b*f-c*e)/(b*d-a*e)
        y = (a*f-d*c)/(a*e-b*d)
        print("{:.3f} {:.3f}".format(x,y))
    except:
        break

Submission status: Wrong Answer

Solution code:
import fileinput

for line in fileinput.input():
    v = [int(i) for i in line.split(" ")]
    x = (v[2] * v[4] - v[1] * v[5]) / (v[0] * v[4] - v[1] * v[3])
    y = (v[2] * v[3] - v[0] * v[5]) / (v[1] * v[3] - v[0] * v[4])
    print("%.3f" % x, "%.3f" % y)

Submission status: Wrong Answer

Solution code:
import fileinput

if __name__ == "__main__":
    for line in fileinput.input():
        v = [int(i) for i in line.split(" ")]
        x = (v[2] * v[4] - v[1] * v[5]) / (v[0] * v[4] - v[1] * v[3])
        y = (v[2] * v[3] - v[0] * v[5]) / (v[1] * v[3] - v[0] * v[4])
        print("%.3f" % x, "%.3f" % y)