Algorithm/백준
C++ 알고리즘 - 백준 19532 수학은 비대면강의입니다 (연립방정식 해 찾기)
마루설아
2025. 1. 11. 19:52
https://www.acmicpc.net/problem/19532
#include <bits/stdc++.h>
#define endl "\n"
using namespace std;
int main(void) {
/************** C++ Init **************/
ios::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
/************** C++ Init **************/
int a, b, c, d, e, f;
cin >> a >> b >> c >> d >> e >> f;
// x
cout << (c * e - b * f) / (a * e - b * d) << endl;
// y
cout << (c * d - a * f) / (b * d - a * e);
}