Accepted
Code
#include <bits/stdc++.h>
using namespace std;
#define FAST ios_base::sync_with_stdio(false);cin.tie(NULL);
using ll = long long;
int main() {
FAST;
int tc = 1, ti;
cin >> tc;
for (ti = 1; ti <= tc; ++ti) {
ll x, y, ans;
cin >> x >> y;
ans = x*y - min(x, y);
cout << ans << "\n";
}
return 0;
}
Information
- Submit By
- Type
- Submission
- Problem
- P1075 GCD not equal LCM
- Language
- C++17 (G++ 13.2.0)
- Submit At
- 2024-10-04 19:02:25
- Judged At
- 2024-11-11 02:42:14
- Judged By
- Score
- 100
- Total Time
- 56ms
- Peak Memory
- 2.117 MiB