Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

func read() string {
	sc.Scan()
	return sc.Text()
}

func main() {
	sc.Split(bufio.ScanLines)
	for sc.Scan() {
		s := strings.Split(sc.Text(), " ")
		a, _ := strconv.ParseFloat(s[0], 64)
		b, _ := strconv.ParseFloat(s[1], 64)
		c, _ := strconv.ParseFloat(s[2], 64)
		d, _ := strconv.ParseFloat(s[3], 64)
		e, _ := strconv.ParseFloat(s[4], 64)
		f, _ := strconv.ParseFloat(s[5], 64)
		x := ((b * f) - (c * e)) / ((b * d) - (a * e))
		y := ((a * f) - (c * d)) / ((a * e) - (b * d))
		if x == 0 {
			fmt.Printf("0.000 %.3f\n", y)
		} else if y == 0 {
			fmt.Printf("%.3f 0.000\n", x)
		} else {
			fmt.Printf("%.3f %.3f\n", x, y)
		}
	}
}

Python: import sys, math

array = []
for line in sys.stdin:
    array.append(map(int, line.split(' ')))

for a, b, c, d, e, f in array:
    determinant = a * e - b * d
    if determinant == 0:
        print('NO ANSWER')
    x = (c * e - b * f) / determinant
    y = (a * f - c * d) / determinant
    x = math.floor(x * 1000) / 1000
    y = math.floor(y * 1000) / 1000

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

Python: #!/usr/bin/env python3
import sys


def Print(array):
    for r in range(len(array)):
        print(array[r])
    print()


def Gauss(array):
    for r in range(len(array)):
        array[r].append(r)

    for r in range(len(array)):
        array.sort(key=lambda x: x[r], reverse=True)
        div = array[r][r]
        for c in range(r, len(array) + 1):
            array[r][c] /= div
        for r2 in range(r + 1, len(array)):
            head = array[r2][r]
            for c in range(r, len(array) + 1):
                array[r2][c] -= head * array[r][c]

    result = [0] * len(array)
    for r in range(len(array) - 1, -1, -1):
        result[r] = array[r][
            len(array)] - sum([result[x] * array[r][x] for x in range(r + 1, len(array))])
    return result


for line in sys.stdin:
    [a, b, c, d, e, f] = [int(x) for x in line.split()]
    result = Gauss([[a, b, c], [d, e, f]])
    for i in range(len(result) - 1):
        print("{0:.3f}".format(result[i]), end=" ")
    print("{0:.3f}".format(result[-1]))

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

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

        n = d/a
        a = n*a
        b = n*b
        c = n*c

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

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

Python: 

dataset = []
while True:
    try:
        dataset.append(input())
    except EOFError:
        break

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

Python: def main():
    while 1:
        try:
            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]
        except:
            break
        if abs(x)<1e-4:
            x=0.0
        if abs(y)<1e-4:
            y=0.0
        print("{:.3f} {:.3f}".format(x,y))

main()

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

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+0.0, y+0.0))
    except:
        break

Python: 
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
    return x, y


sets = []

while True:
    try:
        line = list(map(int, input().split()))
        if(line[0] == " "):
            break;
        else:
            sets.append(line)
    except IndexError:
        break

for i in sets:
    x, y = ans(i[0],i[1],i[2],i[3],i[4],i[5])
    print(x, y)

Python: 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(format(x, ".3f"), format(y, ".3f"))

Python: while True:
  try:
    a, b, c, d, e, f = map(int, input().split(" "))
    
    det = 1 / (a * d - b * c)
    x = det * (d * e - b * f)
    y = det * ((-c) * e + a * e)

    print(str(x), str(y))

  except:
    break

Python: import math
import sys

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

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

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

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

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

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