0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-11-10 02:18:48 +00:00

A - Mathematical Addition

https://codeforces.com/contest/1589/submission/135351528
This commit is contained in:
Baoshuo Ren 2021-11-14 14:24:25 +08:00 committed by Baoshuo Ren
parent 42d5617483
commit 483d7ddd61
Signed by: baoshuo
GPG Key ID: 70F90A673FB1AB68

20
CodeForces/1589/A/A.cpp Normal file
View File

@ -0,0 +1,20 @@
#include <bits/stdc++.h>
using namespace std;
int t, u, v;
long long uu, vv, k, x, y;
int main() {
cin >> t;
while (t--) {
cin >> u >> v;
uu = 1ll * u * u;
vv = 1ll * v * v;
k = __gcd(uu, vv);
x = -(uu / k);
y = vv / k;
cout << x << ' ' << y << endl;
}
return 0;
}