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: try:
    while True:
        a,b,c,d,e,f=map(int, input().split())
        print( "{0:.3f}".format(round((c*e-b*f)/(a*e-b*d),3)), "{0:.3f}".format(round((a*f-c*d)/(a*e-b*d),3)) )
except EOFError:
    pass

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

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

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

Python: import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()


class Matrix():
    def __init__(self, A):
        self.A = A
        self.row = len(A)
        self.col = len(A[0])

    def __iter__(self):
        return self.A.__iter__()

    def __getitem__(self, i):
        return self.A.__getitem__(i)

    def __add__(self, B):
        aa = self.A
        bb = B.A
        return Matrix([[aa[i][j] + bb[i][j] for j in range(self.col)] for i in range(self.row)])

    def __sub__(self, B):
        aa = self.A
        bb = B.A
        return Matrix([[aa[i][j] - bb[i][j] for j in range(self.col)] for i in range(self.row)])

    def __mul__(self, B):
        aa = self.A
        bb = B.A
        a = []
        for i in range(self.row):
            ai = aa[i]
            r = []
            for j in range(B.col):
                r.append(sum([ai[k] * bb[k][j] for k in range(self.col)]))
            a.append(r)
        return Matrix(a)

    def __truediv__(self, x):
        pass

    def lu(self):
        # squaren??????
        size = self.row
        T = copy.deepcopy(self.A)
        L = [[0]*size for _ in range(size)]
        U = [[0]*size for _ in range(size)]
        for i in range(size):
            for j in range(i,size):
                L[j][i] = T[j][i]
            for j in range(i,size):
                U[i][j] = T[i][j] / T[i][i]
            for j in range(i+1,size):
                for k in range(i+1,size):
                    T[j][k] -= L[j][i] * U[i][k]

        return Matrix(L),Matrix(U)

    def __str__(self):
        return self.A.__str__()

# ??£???????¨????????§£???
def solve_se(A, b):
    n = A.row
    L,U = A.lu()
    y = []
    for i in range(n):
        t = b[i]
        for k in range(i):
            t -= L[i][k] * y[k]
        y.append(t / L[i][i])

    x = [0] * n
    for i in range(n-1,-1,-1):
        t = y[i]
        for k in range(i+1,n):
            t -= U[i][k] * x[k]
        x[i] = t
    return x


def main():
    sa = [s for s in sys.stdin.read().split('\n') if s]
    r = []
    for s in sa:
        a,b,c,d,e,f = [int(c) for c in s.split()]
        A = Matrix([[a,b],[d,e]])
        B = [c,f]
        x = solve_se(A,B)
        r.append(' '.join(map(lambda t: '{:01.3f}'.format(t), x)))

    return '\n'.join(r) + '\n'

print(main())

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

Python: import sys

for line in sys.stdin:
    ll = [int(x) for x in line.split()]
    #print(ll)
    a = ll[0]
    b = ll[1]
    c = ll[2]
    d = ll[3]
    e = ll[4]
    f = ll[5]

    x = (c*e-b*f)/(a*e-b*d)
    y = (a*f-d*c)/(a*e-d*b)
    print(round(x,3), round(y,3))

Python: import string
import sys
import math

#??????????????\????????????ip?????\??????
ip = sys.stdin.readlines()
ip_list = {}

#?????????????????§?????????
for i in range(len(ip)):
    ip_list[i] = ip[i].strip("\n").split()
    x = int( float( int(ip_list[i][2])*int(ip_list[i][4]) - int(ip_list[i][1])*int(ip_list[i][5]) ) / float( int(ip_list[i][0])*int(ip_list[i][4]) - int(ip_list[i][1])*int(ip_list[i][3]) ))
    y = int( float( int(ip_list[i][2])*int(ip_list[i][3]) - int(ip_list[i][0])*int(ip_list[i][5]) ) / float( int(ip_list[i][1])*int(ip_list[i][3]) - int(ip_list[i][0])*int(ip_list[i][4]) ))
    
    x = ('%.3f' % x)
    y = ('%.3f' % y)
    print(str(x)+" "+str(y))

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

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

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

Python: #!/usr/bin/env python3
# -*- coding: utf-8 -*-

import sys
import math

def my_round(x):
    xx = 1000*x
    f, _ = math.modf(xx)
    if f >= 0.5:
        xx += 1
    return xx / 1000

def main():
    for line in sys.stdin:
        a, b, c, d, e, f = map(float, line.split())

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

        xr = my_round(x)
        yr = my_round(y)
        print("{:.3f} {:.3f}".format(x, y))

if __name__ == "__main__": main()

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

Python: while True:
    try:
        line=input()

    except:
        break

    a,b,c,d,e,f=map(int, line.strip().split())

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

    print(x,y)

Python: 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(float,input().split())
    except:
        break
    ren(a,b,c,d,e,f)

Python: import sys

lines = sys.stdin.readlines()
for line in lines:
    a = list(map(float, line.split(" ")))
    tmp = a[0]
    for i in range(0, 3):
        a[i] = a[i] * a[3]
    for i in range(3, 6):
        a[i] = a[i] * tmp
    y = (a[2] - a[5]) / (a[1] - a[4])
    x = (a[2] - a[1] * y) / a[0]
    print("{0:0.3f} {1:0.3f}".format(x, y))