Accepted
Code
/**
* author: pollob18
* created: July 2024
**/
#include <bits/stdc++.h>
#define ll long long int
#define yes "YES"
#define no "NO"
#define nl "\n"
#define pb push_back
#define all(a) a.begin(),a.end()
#define allr(a) a.rbegin(),a.rend()
#define Code_By_pollob ios::sync_with_stdio(false); cin.tie(0);
using namespace std;
void solution()
{
ll a,b;
cin>>a>>b;
int x=0;
cout<<a*b-min(a,b)<<nl;
}
int main()
{
Code_By_pollob
int tc;
cin>>tc;
while(tc--)
{
solution();
}
return 0;
}
Information
- Submit By
- Type
- Submission
- Problem
- P1075 GCD not equal LCM
- Contest
- Brain Booster #5
- Language
- C++20 (G++ 13.2.0)
- Submit At
- 2024-09-05 15:54:16
- Judged At
- 2024-10-03 13:09:54
- Judged By
- Score
- 100
- Total Time
- 30ms
- Peak Memory
- 2.238 MiB