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 := float64(cF) / float64(bE)
		x := (float64(c) - (y * float64(b))) / float64(a)

		if x == 0 {
			fmt.Printf("%.3f ", 0.0)
		} else {
			fmt.Printf("%.3f ", x)
		}
		if y == 0 {
			fmt.Printf("%.3f\n", 0.0)
		} else {
			fmt.Printf("%.3f\n", y)
		}
	}
}

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

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

Python: 

while True:
    try:
        line=input()

    except:
        break

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

    z=a*e-b*d
    if z==0:
        break

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

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

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

Python: import sys

for i in sys.stdin.readlines():
    a, b, c, d, e, f = [int(x) for x in i.split()]
    y = (c * d - a * f) / (b * d - a * e)
    x = (c - b * y) / a
    print('{0:.3f} {1:.3f}'.format(x, y))

Python: import sys
dataset = sys.stdin.readlines()

for item in dataset:
    a, b, c, d, e, f = list(map(int, item.split()))
    k1 = e * (a/d)
    k2 = f * (a/d)

    y = (c * d - f * a)/(b * d - e * a)
    x = (c * e - b * f) / (a * e - b * d)
    if x == 0:
        x = 0
    print("{:.3f} {:.3f}".format(x, y))

Python: import sys
for line in sys.stdin.readlines():
    a, b, c, d, e, f=map(float,line.split())
    k=(a*e)-(b*d)
    xval=(c*e)-(b*f)
    yval=(a*f)-(c*d)
    print("%.3f %.3f"%(xval/k,yval/k))

Python: def _round(x, d=0):
    p = 10 ** d
    return (x * p * 2 + 1) // 2 / p


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("{:0.3f}".format(_round(x / s, 4)), "{:0.3f}".format(_round(y / s, 4)))
except:
    pass