Created
February 9, 2015 20:31
-
-
Save theoremoon/7545528b8d5624381f51 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* AOJ 4 | |
* Simultaneous Equation (PCK 2003) | |
* AC | |
*/ | |
#include <iostream> | |
#include <cstdio> | |
using namespace std; | |
int main () { | |
double a, b, c, | |
d, e, f; | |
while(cin >> a >> b >> c >> d >> e >> f) { | |
double y = (c*d-f*a) / (b*d-e*a); | |
double x = (c - b*y) / a; | |
printf("%.3lf %.3lf\n", x, y); | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment