Baekjoon(C++)
[C++]백준 알고리즘 19532번
DanielSoliph
2021. 7. 11. 23:20
풀이는 아래와 같다.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#include <iostream>
using namespace std;
int main(){
int a,b,c,d,e,f;
cin >>a>>b>>c>>d>>e>>f;
float x,y;
y = (c*d-a*f)/(b*d-a*e);
x = (b*f-c*e)/(b*d-a*e);
cout << x <<' '<< y << '\n';
return 0;
}
|
cs |
시행착오:
단순한 수학 문제라 간단하게 풀었다.
반응형