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

C++: #include <iostream>
#include <iomanip>
#include <vector>

using namespace std;

static vector<double> solve_simultaneous(const vector<double> &set) {
	vector<double> result(2, 0);
	result.at(0) = ( (set.at(2) * set.at(4) - set.at(1) * set.at(5))
		/ (set.at(0) * set.at(4) - set.at(1) * set.at(3)) );
	result.at(1) = ( (set.at(2) * set.at(3) - set.at(0) * set.at(5))
		/ (set.at(1) * set.at(3) - set.at(0) * set.at(4)) );

	if (result.at(0) == 0) {
		result.at(0) = 0;
	}
	if (result.at(1) == 0) {
		result.at(1) = 0;
	}

	return result;
}

int main(void) {
	int dataset_counter = 0;
	double check_input = 0;
	vector<vector<double> > input;

	while (cin >> check_input) {
		input.push_back(vector<double>(6));
		input.at(dataset_counter).at(0) = check_input;
		for (int i = 1; i < 6; i ++) {
			double temp;
			cin >> input.at(dataset_counter).at(i);
		}

		dataset_counter ++;
	}

	for (vector<double> dataset : input) {
		vector<double> result(2, 0);
		result = solve_simultaneous(dataset);

		cout << fixed;
		cout << setprecision(3) << result.at(0) << " "
		<< setprecision(3) << result.at(1) << endl;
	}

	return 0;
}

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

	int main(){

		double a,b,c,d,e,f;
		while(cin>>a>>b>>c>>d>>e>>f)
		{
			double tx,ty;

			tx = (1.0*(c*e - b*f) / (e*a - b*d));
			ty = (1.0*(d*c - a*f) / (b*d - a*e));

			if(tx>=0){
			tx+=0.0004;
		}
		else{
			tx-=0.0004;
		}
		if(ty>=0){
		   ty+=0.0004;
		}
		else{
			ty-=0.0004;
		}

			cout<<setprecision(3) << setiosflags(ios::fixed)<< tx<<" "<<ty<<endl;
		}
	

		
		return 0;
	}

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

int main()
{
	double a, b, c, d, e, f;
	while (std::cin >> a >> b >> c >> d >> e >> f) {
		double const denominator = a * e - b * d;
		std::cout.setf(std::ios::fixed);
		std::cout.precision(3);
		std::cout << std::showpoint
				  << (c * e - b * f) / denominator << ' '
				  << (a * f - c * d) / denominator << std::endl;
	}
	return 0;
}

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

using namespace std;
float a,b,c,d,e,f;
float findoutx,findouty;
float x,y,yadd;
float Timers1,Timers2;
int main()
{
    while(cin >> a >> b >> c >> d >> e >> f)
    {
    Timers1 = a;
    Timers2 = d;
    a=a*Timers2;
    b=b*Timers2;
    c=c*Timers2;
    d=d*Timers1;
    e=e*Timers1;
    f=f*Timers1;

    findouty=b-e;
    yadd = c-f;
    findouty = yadd/findouty;
    b = b*findouty;
    findoutx=(c-b)/a;

    if(findoutx==0)findoutx=0;
    if(findouty==0)findouty=0;



    cout<<fixed<<setprecision(3)<<findoutx << " "<<findouty<<endl;
    }

return 0;
}

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

C++: #include<iostream>
#include<cstdio>
using namespace std;
int main()
{
	int s = 1000000;
	int n;
	cin >> n;
	while (n--) {
		if (int(s*1.05) % 1000 == 0) {
			s = int(s*1.05);
		}
		else {
			s = int(s*1.05) + (1000 - int(s*1.05) % 1000);
		}
	}
	printf("%d\n", s);
    return 0;
}

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

C++: #include <cstdio>
#include <stdlib.h>
#include <math.h>

float a,b,c,d,e,f;
double    round( double val, int precision )
{
    double    ret;
    char    buf[256] = {'\0'};
    char    *p;

    sprintf( buf, "%.*f", precision, val );
    ret = strtod( buf, &p );

    return ret;
}
int main (){
  scanf("%f %f %f %f %f %f",&a,&b,&c,&d,&e,&f);
  double x,y;
  x=(f*b/e-c)/(d*b/e-a);
  y=(f*a/d-c)/(e*a/d-b);
 round(x,4);
 round(y,4);
modf(x*1000, &x);
modf(y*1000, &y);
  printf("%.3f %.3f\n",x/1000,y/1000);
}

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

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

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

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


int main()
{
	double x1, y1, a, x2, y2, b;
	for (int i = 0; i < 2; i++)
	{
		cin >> x1 >> y1 >> a >> x2 >> y2 >> 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);
	}
	return 0;
}

C++: #include <iostream>
#include <cstdio>
/*
 * 
   1  2  3  4  5  6
   2 -1 -2 -1 -1 -5  
 * 
 */
int main()
{
    double a,b,c,d,e,f;
    while(std::cin >> a >> b >> c >> d >> e >> f) 
    {
        double y = ( (c / a) - (f / d) ) / ( (b / a) - (e /d ));
        double x = ( c / a ) - ( b / a ) * y;
        printf("%.3f %.3f",x,y);
    }  
    return 0;
}

C++: #include<stdio.h>
int main()

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

C++: #include <stdio.h>

/* INPUT TYPE:
** Ax + By = C
** Dx + Ey = F
*/

int main(){
  float A, B, C, D, E, F, ans_x, ans_y = 0;
  scanf("%f %f %f %f %f %f", &A, &B, &C, &D, &E, &F);

  // x?????????AD???
  B = B*D;
  C = C*D;
  E = E*A;
  F = F*A;


  ans_y = (C-F) / (B-E);
  ans_x = (C-B*ans_y) / (A*D);

  printf("%.3f %.3f\n", ans_x, ans_y);

  return 0;
}

C++: #include <iostream>

using namespace std;

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