Go: package main

import (
        "fmt"
        "bufio"
        "os"
)

func main() {
        var a, b, c, d, e, f float64
        sc := bufio.NewScanner(os.Stdin)
        for sc.Scan() {
                fmt.Sscanf(sc.Text(), "%f %f %f %f %f %f", &a, &b, &c, &d, &e, &f)

                det := a*e - b*d
                x := (e*c - b*f) / det
                y := (a*f - c*d) / det
                fmt.Printf("%04f %04f\n", x, y)
        }
}

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

int main()
{    
    
	int a,b,c,d,e,f;

	
	while (~ scanf( "%d%d%d%d%d%d" ,&a,&b,&c,&d,&e,&f) )
	
	{
		double y=(double)(c*d-a*f)/(double)(b*d-a*e);
		if(a!=0)
		
		printf("%.3f %.3f\n",(c-b*y)/a,y);
		else
		printf("%.3f %.3f\n",(f-e*y)/d,y);
	}

    return 0;
    
    }

C++: #include <iostream>

using namespace std;

/*
aX+bY=c
dX+eY=f
*/

void solve(int a, int b, int c, int d, int e, int f) {
	int x = (f - ec/b) / (d - ec/b);
	int y = (c - ax) / b;
	cout << x << " " << y << endl;
}

int main() {
	int a, b, c, d, e, f;
	while (cin >> a >> b >> c >> d >> e >> f) {
		solve(a,b,c,d,e,f);
	}
	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 ){
	int det=a*e-b*d;
	int X,Y; X=c*e-b*f ; Y=a*f-c*d; 
	double x,y;
	if(X==0) x=0;if(Y==0) y=0;
	if(X!=0 && Y!=0) x=(double)X/det;y=(double)Y/det;
	cout << fixed << setprecision(3) ;
	cout << x << ' ' << y << '\n' ;
	};
}

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

 }
}