Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

func gcd(num1, num2 int) int {
	if num2 == 0 {
		return num1
	}
	num3 := num1 % num2
	return gcd(num2, num3)
}

func lcm(num1, num2 int) int {
	if num1%num2 != 0 {
		num3 := gcd(num1, num2)
		for i := 1; ; i++ {
			check := num3 * i
			if check%num1 == 0 && check%num2 == 0 {
				return check
			}
		}
	} else {
		return num1
	}
}

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	for scanner.Scan() {
		strNums := strings.Fields(scanner.Text())
		nums := []int{}
		for _, strNum := range strNums {
			num, _ := strconv.Atoi(strNum)
			nums = append(nums, num)
		}
		a := nums[0]
		b := nums[1]
		c := nums[2]
		d := nums[3]
		e := nums[4]
		f := nums[5]
		lcm := lcm(a, d)
		mulA := lcm / a
		mulD := lcm / d
		a *= mulA
		b *= mulA
		c *= mulA
		d *= mulD
		e *= mulD
		f *= mulD

		if d < 0 {
			d *= -1
			e *= -1
			f *= -1
		}

		bE := b - e
		cF := c - f
		y := cF / bE
		x := (c - (y * b)) / a

		fmt.Printf("%d.000 ", x)
		fmt.Printf("%d.000\n", y)
	}
}

Python: import sys

inputNum = sys.stdin.readlines()

for i in inputNum:
    new = []
    n = i[:-1].split(' ', 6)
    for s in n:
        new.append(float(s))
    k = new[0]
    q = 0
    for a in new[0:3]:
        new[q] = a/k
        q = q + 1
    l = new[3]
    for a in new[3:6]:
        new[q] = a - l*new[q-3]
        q = q + 1
    if new[4] == 0:
        y = new[5]
    else:
        y = new[5]/new[4]
    x = new[2]-(new[1]*y)
    print("{0:.3f}".format(x)+" "+"{0:.3f}".format(y))

Python: import sys
for line in sys.stdin:
    a,b,c,d,e,f = map(int, line.split())
    y = (c/a - f/d)/(b/a - e/d)
    x = -(e/d) * y + (f/d)
    print("{:.3f} {:.3f}".format(x, y))

Python: 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])
        y = (list[0]*list[5]-list[2]*list[3])/(list[0]*list[4]-list[1]*list[3])
        
        print("%.3f %.3f" %(x, y))
        
    except EOFError:
        break

Python: # coding: utf-8
# Your code here!
def ren(a,b,c,d,e,f):
    x=(c*e-f*b)/(a*e-b*d)
    y=(c*d-f*a)/(b*d-e*a)
    
    print(f'{x+0:.3f} {y+0:.3f}')

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

Python: import sys
from decimal import Decimal
from fractions import Fraction

def main():

    #input_strings = sys.stdin.readlines()
    for matrix_string in input_strings:
        matrix = list(map(Fraction, list(matrix_string.split())))
        if matrix[0] == 0:
            matrix = matrix[3:] + matrix[:3]
        matrix = list(map(lambda x: x / matrix[0], matrix[:3])) + matrix[3:]
        matrix = matrix[:3] + list(map(lambda x: x[1] - matrix[3] * x[0], zip(matrix[:3], matrix[3:])))
        matrix = matrix[:3] + list(map(lambda x: x / matrix[4], matrix[3:]))
        matrix = list(map(lambda x: x[0] - matrix[1] * x[1], zip(matrix[:3], matrix[3:]))) + matrix[3:]
        matrix = list(map(float, matrix))
        matrix = list(map(Decimal, matrix))
        matrix = list(map(lambda x: x.quantize(Decimal('.001'), rounding='ROUND_HALF_UP'), matrix))
        matrix = list(map(lambda x: x + 0, matrix))

        print('%.3f %.3f' % (matrix[2], matrix[5]))
main()

Python: EPS=0.0001
while True:
 try:
  a,b,c,d,e,f = [float(item) for item in input("").split(" ")]

  x1=(e*c-b*f)/(a*e-b*d)+EPS
  y1=(-c*d+a*f)/(a*e-b*d)+EPS

#a,b,c,d,e,f = [float(item) for item in input("").split(" ")]
#x2=(e*c-b*f)/(a*e-b*d+EPS)
#y2=(-c*d+a*f)/(a*e-b*d+EPS)

  print('{0:.3f} {1:.3f}'.format(x1,y1))
 except EOFError:
  break

Python: def r(val):
	v = val
	m = 1
	if val<0 : m=-1
	val = int(abs(val)*1000+0.51)*m
	return val/1000

def solve():
	[a,b,c,d,e,f] = list(map(int,input().split()))
	[x,y] = [e*c - b*f,a*f - c*d]
	di = a*e-b*d
	x /= di
	y /= di
	x = r(x)
	y = r(y)
	print("%.3f %.3f"%(x,y))


while True:
	try: solve()
	except: break

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()