/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 2ms 328.0 KiB
#2 Accepted 2ms 368.0 KiB
#3 Accepted 6ms 604.0 KiB
#4 Accepted 63ms 1.355 MiB
#5 Accepted 56ms 2.062 MiB
#6 Accepted 59ms 2.117 MiB

Code

/* SRIJON
        SINGHA
            SAMANTA */
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef long double ld;
#define nl "\n"
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
#define yes cout << "YES" << nl
#define no cout << "NO" << nl
#define fi first
#define sec second
#define pb push_back
#define ppb pop_back
#define pf push_front
#define ppf pop_front
#define FIO                           \
    ios_base::sync_with_stdio(false); \
    cin.tie(NULL);                    \
    cout.tie(NULL);
const int mod = 1e9 + 7;

int32_t main()
{
    FIO

    ll t;	cin >> t;
    ll tt=t;
    while (tt--)
    {
        ll a,b; cin>>a>>b;
        cout<<a*b-min(a,b)<<nl;      
    }

    return 0;
}

Information

Submit By
Type
Submission
Problem
P1075 GCD not equal LCM
Contest
Brain Booster #5
Language
C++17 (G++ 13.2.0)
Submit At
2024-09-05 15:58:42
Judged At
2024-10-03 13:09:36
Judged By
Score
100
Total Time
63ms
Peak Memory
2.117 MiB