Go: package main

import "fmt"

func main() {

	for {
		var a, b, c, d, e, f float64
		var x, y float64
		i, _ := fmt.Scanf("%f %f %f %f %f %f", &a, &b, &c, &d, &e, &f)
		if i != 6 {
			return
		}

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

		fmt.Printf("%.3f %.3f\n", x, y)
	}
}

Python: # -*- coding: utf-8 -*-

while True:
    try:
        list = [float(x) for x in raw_input().split() ]
        x = (list[2]*list[4]-list[1]*list[5])/(list[0]*list[4]-list[1]*list[3])+0
        y = (list[0]*list[5]-list[2]*list[3])/(list[0]*list[4]-list[1]*list[3])+0

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

    except EOFError:
        break

Python: #連立方程式
import numpy as np

while True:
    try:
        a,b,c,d,e,f = list(map(int,input().split()))
        a,b,c,d,e,f = int(a),int(b),int(c),int (d),int(e),int(f)
        function(a,b,c,d,e,f)
    except EOFError:
        break

def function(a,b,c,d,e,f):
    A = np.matrix([
    [a, b],
    [d, e]
    ])
    Y = np.matrix([
    [c],
    [f]
    ])
    result = np.linalg.inv(A)*Y
    print('{:.3f}'.format(float(result[0])), '{:.3f}'.format(float(result[1])))

Python: # -*- coding: utf-8 -*-

import math

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

Python: import sys
import numpy as np
#np.set_printoptions(formatter={'float': '{: 0.3f}'.format}) #桁を揃える

line = sys.stdin.readlines()
#print(line)
for i in line:
    cnt = 0
    idx = 0
    a = np.array([0.0, 0.0, 0.0, 0.0])
    b = np.array([0.0, 0.0])
    for k in list(map(float, i.split(" "))):
        if cnt == 2:
            b[0] = k
            idx -= 1
        elif cnt == 5:
            b[1] = k
        else:
            a[idx] = k
        cnt += 1
        idx += 1
    #print(a, b)
    a = a.reshape(2, 2)
    x = np.linalg.solve(a, b)
    print('{0: 0.3f} {1: 0.3f}'.format(x[0], x[1]))

Python: def equation(a,b,c,d,e,f,x):
    buff = a*e-b*d
    buff_a = a

    a = e/buff
    b = -b/buff
    d = -d/buff
    e = buff_a/buff

    x.append((a*c)+(b*f))
    x.append((d*c)+(e*f))

count = 0
a = []
b = []
c = []
d = []
e = []
f = []

while True:
    try:
        buff = input().split()
        a.append(float(buff[0]))
        b.append(float(buff[1]))
        c.append(float(buff[2]))  
        d.append(float(buff[3]))
        e.append(float(buff[4]))
        f.append(float(buff[5]))
        count += 1
    except:
        break

for i in range(count):
    ans = []

    equation(a[i],b[i],c[i],d[i],e[i],f[i],ans)
    print('{:.3f}'.format(ans[0]),'{:.3f}'.format(ans[1]))

Python: 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

Python: # -*- 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))
    if x == -0:
        x = 0
    if y == -0:
        y = 0
        
    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]))

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

Python: import sys

def main():
    """ ????????? """
    istr = sys.stdin.read()
    wi = istr.splitlines()
    for i in wi:
        a, b, c, d, e, f = list(map(int,i.split()))
        z = (a * e - b * d)
        x = round((c * e - b * f) / z, 3)
        y = round((a * f - c * d) / z, 3)
        print("{0:.3f} {1:.3f}".format(x,y))

if __name__ == '__main__':
    main()

Python: # coding: utf-8

while True:
	data = map(int, raw_input().split())
	a = data[0]
	b = data[1]
	c = data[2]
	d = data[3]
	e = data[4]
	f = data[5]

	x = (c*e-b*f)*1.0 / (a*e-b*d)
	if x == -0.000:
		x = 0.000
	if b != 0:
		y = (c-a*x)/b
	else:
		y = (f-d*x)/e
	if y == -0.000:
		y = 0.000

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

Python: while True:
    try:
        L=list(map(int,input().split()))
        x=L[0]*L[4]-L[3]*L[1]
        y=L[2]*L[4]-L[5]*L[1]
        z=y/x+0
        w=(L[2]-L[0]*z)/L[1]+0
        print(f"{z:.3f} {w:.3f}")
    except EOFError:
        break

Python: 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

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

Python: 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]]

Python: import sys

ary=[]
ans=[]
def solve(a,b,c,d,e,f):
    x=round((c*e-b*f)/(a*e-b*d),3)
    y=round((c*d-a*f)/(b*d-a*e),3)
    return [x,y]

for i in sys.stdin:
    ary.append(list(map(int,i.split())))
    ans.append(solve(*ary[-1]))

for i in range(len(ans)):
    print('{0:.3f} {1:.3f}'.format(*ans[i]))

Python: import sys
strs = sys.stdin.readlines()
for s in strs:
    a, b, c, d, e, f = map(int, s.split())
    print('{:.3f} {:.3f}'.format((c*e - b*f) / (a*e - b*d), (a*f - c*d) / (a*e - b*d)))

Python: import sys
from decimal import Decimal

def main():
    for input_line in sys.stdin:
        input_line = raw_input()
        x1 = int(input_line.split(' ')[0])
        y1 = int(input_line.split(' ')[1])
        p = int(input_line.split(' ')[2])
        x2 = int(input_line.split(' ')[3])
        y2 = int(input_line.split(' ')[4])
        q = int(input_line.split(' ')[5])
        multiplicand1, multiplicand2 = calculate1(x1, x2)
        after_y1, after_y2, after_p, after_q = calculate2(y1, y2, p, q, multiplicand1, multiplicand2)
        calculate3(after_y1, after_y2, after_p, after_q, x1, y1, p)
    
def calculate1(x1, x2):
    if (x1 >= 0 and x2 >= 0) or (x1 < 0 and x2 < 0):
        multiplicand1 = -x2
        multiplicand2 = x1
        return multiplicand1, multiplicand2
    else:
        multiplicand1 = abs(x2)
        multiplicand2 = abs(x1)
        return multiplicand1, multiplicand2
    
def calculate2(y1, y2, p, q, multiplicand1, multiplicand2):
    after_y1 = Decimal(y1 * multiplicand1)
    after_y2 = Decimal(y2 * multiplicand2)
    after_p = Decimal(p * multiplicand1)
    after_q = Decimal(q * multiplicand2)
    return after_y1, after_y2, after_p, after_q

def calculate3(after_y1, after_y2, after_p, after_q, x1, y1, p):
    y = Decimal(after_p + after_q) / Decimal(after_y1 + after_y2)
    y = round(y, 3)
    x = Decimal(p - y1 * y) / Decimal(x1)
    x = round(x, 3)
    print('%.3f %.3f' % (x, y))
    
if __name__ == '__main__':
    main()

Python: hoe

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