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

C++: #include <iostream>
#include <iomanip>
#include <math.h>

using namespace std;

int main(void) {
	while(1) {
		int a, b, c, d, e, f;
		double x, y;
		cin >> a >> b >> c >> d >> e >> f;
		if(cin.eof()) break;

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

		cout << fixed << setprecision(3) << x << " " << y << endl;
	}
	return 0;
}

C++: #include <iostream>
#include <stdio.h>
using namespace std;

int main(){
    	double a, b, c, d, e, f;
	double x, y;
	while((cin >> a >> b >> c >> d >> e >> f)){
		x= (double)(1.0/(a*e-b*d))*(e*c-b*f);
		y= (double)(1.0/(a*e-b*d))*(-d*c+a*f);
		printf("%.3f %.3f\n", x, y);
	}
	return 0;
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
int main()
{ int i=0;
  double B[6],x,y;
 while(scanf("%lf%lf%lf%lf%lf%lf",&B[0],&B[1],&B[2],&B[3],&B[4],&B[5])!=EOF)
 {
  x=(B[1]*B[5]-B[2]*B[4])/(B[1]*B[3]-B[0]*B[4]);
  y=(B[2]-B[0]*x)/B[1];
  i=0;
  printf("%.3lf %.3lf\n",x,y);
  }
return 0;
}

C++: #include <iostream>
#include <stdio.h>
using namespace std;

int main(void){
	int a,b,c,d,e,f;
	double x,y;

	while(cin >> a >> b >> c >> d >> e >> f){
		x = (double)(b*f-e*c)/(b*d-a*e);
		y = (double)(a*f-d*c)/(a*e-b*d);
		printf("%.3f %.3f\n",x,y);
	}

	return 0;

}

C++: #include <iostream>
#include "stdio.h"
//#include "math.h"

using namespace std;

int main(){
	double a,b,c,d,e,f,x,y;
	while(cin.eof()==false){
//		break;
	a=10000;
	cin >> a >> b >> c >> d >> e >> f;
	if (a==10000){
		break;
	}

	double under = a*e-b*d;
	if((c*e-b*f)/under<0.0005 && (c*e-b*f)/under>-0.0005){
		x=0;
	}
	else{
		x=(c*e-b*f)/under;
	}
	if((a*f-c*d)/under<0.0005 && (a*f-c*d)/under>-0.0005){
		y=0;
	}
	else{
		y=(a*f-c*d)/under;
	}

//	cout << (c*e-b*f)/under << " " << (a*f-c*d)/under << endl;
	printf("%.3f %.3f\n",x,y);
	}
}

C++: #include <bits/stdc++.h>

using namespace std;

int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout << fixed << setprecision(12);
  double a, b, c, d, e, f, x, y;
  while (cin >> a >> b >> c >> d >> e >> f) {
    /*
      x = (b * f - e * c) / (b * d - a * e);
      y = (a * f - d * c) / (b * d - a * e);
    */
    x = (c * e - b * f) / (a * e - b * d);
    y = (a * f - c * d) / (a * e - b * d);
    if (!x) x = 0;
    if (!y) y = 0;
    cout << x << ' ' << y << '\n';
  }
  return 0;
}

C++: #include <iostream>
#include <stdio.h>

using namespace std;

int main(int argc, char **argv)
{
	double a, b, c, d, e, f, tmp;
	
	while((cin >> a >> b >> c >> d >> e >> f)){
		tmp = (a*e-b*d);
		printf("%f %f\n", ((e*c-b*f)/tmp), ((a*f-d*c)/tmp));
	}
	
	return 0;
}

C++: #include <iostream>
#include <cstdio>

using namespace std;

int main()
{
    int a, b, c, d, e, f;
    double x, y;
    while(scanf("%d %d %d %d %d %d", &a, &b, &c, &d, &e, &f) == 6)
    {
        y = (double) (a*f - c*d)/(a*e - b*d);
        x = (double) (c - b*y)/a;
        printf("%.3f %.3f\n", x, y);
    }
    return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
	int a,b,c,d,e,f;
	while(cin >> a >> b >> c >> d >> e >> f){
		double x = double(c*e-f*b)/double(a*e-d*b);
		double y = double(c*d-f*a)/double(b*d-a*e);
   printf("%.3lf %.3lf\n",x,y);
	}
}

C++: #include <stdio.h>
#include <iostream>

using namespace std;

double a,b,c,d,e,f;
double x,y;

int main(){
  while(  cin >> a >> b >> c >> d >> e >> f ){
    printf("%.3f %.3f\n", ((c-(b*((a*f-c*d)/(a*e-b*d))))/a),(a*f-d*c)/(a*e-b*d));
  }
}

C++: #include<iostream>
#include<stdio.h>
#include<iomanip>
using namespace std;
int main(){
	float a,b,c,d,e,f,x,y;
	while(cin>>a>>b>>c>>d>>e>>f){
	y=(c*d-a*f)/(b*d-e*a);
	x=(c-y*b)/a;
	cout<<fixed;
	cout<<setprecision(3)<<x<<" "<<y<<endl;
	}
	return 0;
}

C++: #include <iostream>
#include <iomanip>
using namespace std;
int main(){
	int a,b,c,d,e,f;
	while(cin >> a >> b >> c >> d >> e >> f){
		double x = double(c*e-f*b)/double(a*e-d*b);
		double y = double(c*a-f*d)/double(b*d-a*e);
		cout << fixed << setprecision(3) << x << " " << y << endl;
	}
}

C++: #include<iostream>
#define REP(i,n) for(int i=1;i<=n;i++)
using namespace std;

#define N 10

int main()
{
    int t;
    while(cin >> t)
    {
        int ans = 0;
        for(int i=1;i<=9;i++)for(int j=1;j<=9;j++)for(int k=1;k<=9;k++)for(int l=1;l<=9;l++)if((i+j+k+l)==t)ans++;

        cout << ans << endl;
    }

    return 0;
}

C++: #include <iostream>
#include<iomanip>
using namespace std;

int main()
{
	int a, b, c, d, e, f;
	double x, y;
	while (cin >> a >> b >> c >> d >> e >> f) {
		x = (c*e - b*f) / (a*e - b*d);
		y = (a*f - c*d) / (a*e - b*d);
		cout << fixed
			<< setprecision(3)
			<< x<<""<<y<<endl;
	}

	return 0;
}

C++: #include <iostream>
#include <cstdio>
using namespace std;
void calc(double x1, double y1, double a, double x2, double y2, double b)
{
	double d1 = x2;
	double d2 = x1;
	double xx1 = d1 * x1;
	double xy1 = d1 * y1;
	double a1 = d1 * a;
	double xx2 = d2 * x2;
	double xy2 = d2 * y2;
	double b1 = d2 * b;
	double y = xy1 - xy2;
	double c = a1 - b1;
	y = c / y;


	d1 = y2;
	d2 = y1;
	xx1 = d1 * x1;
	xy1 = d1 * y1;
	a1 = d1 * a;
	xx2 = d2 * x2;
	xy2 = d2 * y2;
	b1 = d2 * b;
	double x = xx1 - xx2;
	c = a1 - b1;
	x = c / x;
	if (x == 0)
	{
		x = 0;
	}
	if (y == 0)
	{
		y = 0;
	}
	printf("%.3lf %.3lf\n", x, y);
}
int main()
{
	int x1, y1, a, x2, y2, b;

	while(scanf_s("%d %d %d %d %d %d", &x1, &y1, &a, &x2, &y2, &b) != EOF)
	{
		calc(x1, y1, a, x2, y2, b);
	}

		
	return 0;
}

C++: #include<iostream>
#include<iomanip>
using namespace std;

int main(){
	float a, b, c, d, e, f, x, y;
	while(cin >> a >> b >> c >> d >> e >> f){
		x = (b * f - c * e) / (b * d - a * e);
		y = (c - a * x) / b;
	}
	if(x > 0) {
		x += 0.0005;
	}
	else(x < 0){
		x -= 0.0005;
	}
	if(y > 0){
		y += 0.0005;
	}
	else(y < 0){
		y -= 0.0005;
	}
	cout << fixed << setprecision(3) << x << ' ' << y << endl;
	return 0;
}

C++: #include<stdio.h>
int main(void)
{
	int b,a,e,d,f,i,c;
	float y,x;
	while(scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f)!=EOF)  {
			y=(c*d-a*f)/(b*d-a*e);
			x=(c-(b*y))/a;
		if(x<0.0000 && x>-0.0001){
			x=0;
		}
		if(y<0.000&&y>-0.0001){
			y=0;
		}	
		printf("%.3f %.3f\n",x,y);
	}
	return 0;
}

C++: #include<iostream>
#include<cstdio>
using namespace std;

int main(){
 double x,y;
 double a,b,c,d,e,f;
 while(!cin.eof()){
   cin >> a >> b >> c >> d >> e >> f ;

   x = (b*f-e*c)/(b*d-a*e);
   y = (c-a*x)/b;
   
   printf("%.3f %.3f\n",x,y);

 }
}

C++: #include<iostream>
#include<stdio.h>
using namespace std;
int main()
{
  int a,b,c,d,e,f;
  while(cin >> a >> b >> c >> d >> e >>f){
    double x,y;
    x=(e*c-b*f)/(a*e-b*d);
    y=(a*f-d*c)/(a*e-b*d);
    printf("%.3f %.3f\n",x, y);   
  }
  
}