/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 532.0 KiB
#2 Accepted 1ms 320.0 KiB
#3 Accepted 4ms 660.0 KiB
#4 Accepted 24ms 1.305 MiB
#5 Accepted 29ms 2.051 MiB
#6 Accepted 28ms 2.113 MiB

Code

#include <bits/stdc++.h>

using namespace std;
using i64 = long long;

void solve() {
    i64 a, b; cin >> a >> b;

    cout << a * b - min(a, b) << '\n';
}

signed main()
{
    ios::sync_with_stdio(false); cin.tie(nullptr);
    i64 T; cin >> T;
    while(T--) solve();
    return 0;
}

Information

Submit By
Type
Submission
Problem
P1075 GCD not equal LCM
Language
C++17 (G++ 13.2.0)
Submit At
2024-10-03 17:28:14
Judged At
2024-11-11 02:46:09
Judged By
Score
100
Total Time
29ms
Peak Memory
2.113 MiB