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
		if bE==0{
		    bE=1
		}
		y := cF / bE
		x := (c - (y * b)) / a

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

Python: from decimal import Decimal, ROUND_HALF_UP, ROUND_HALF_EVEN
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)
      if x==-0:
         x=int(x)
      if y==-0:
         y=int(y)
      X = Decimal(x).quantize(Decimal('0.001'), rounding=ROUND_HALF_UP)
      Y = Decimal(y).quantize(Decimal('0.001'), rounding=ROUND_HALF_UP)
      print(f'{X:.3f} {Y:.3f}')
   except EOFError:
      break

Python: print("hello")

Python: #det = ae - bd
#x = (ce - bf) / det
#y = (af - cd) / det

#-0.000 対策
EPS = 1e-4

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

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