/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 560.0 KiB
#2 Accepted 1ms 436.0 KiB
#3 Accepted 3ms 532.0 KiB
#4 Accepted 23ms 1.449 MiB
#5 Accepted 29ms 2.262 MiB
#6 Accepted 29ms 2.242 MiB

Code

/*For today, you happen to be the defeated. But what will you become tomorrow?*/

#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

using namespace __gnu_pbds;
using namespace std;

#define int long long int 
#define dbg if(debugg)
#define F first 
#define S second 

bool debugg = false;

template <typename T>
using order_set = tree<T, null_type,less<T>, rb_tree_tag,tree_order_statistics_node_update>;

template <typename T>
using minheap = priority_queue<T, vector<T>, greater<T>>;

mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());  

void solve()
{
    int a, b;
    cin >> a >> b;
    cout << a * b - min(a, b) << '\n';
}

int32_t main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
        
    int t = 1;
    cin >> t;
    
    while(t--){
        solve();
    }

    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 16:45:51
Judged At
2024-10-03 13:06:15
Judged By
Score
100
Total Time
29ms
Peak Memory
2.262 MiB