/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 532.0 KiB
#2 Accepted 1ms 532.0 KiB
#3 Accepted 4ms 576.0 KiB
#4 Accepted 24ms 1.406 MiB
#5 Accepted 30ms 2.156 MiB
#6 Accepted 29ms 2.219 MiB

Code

#include <bits/stdc++.h>
using namespace std;

#define int long long

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

signed main() {
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    int T = 1;
    cin >> T;
    while (T--) {
        solve();
    }
    return 0;
}

Information

Submit By
Type
Submission
Problem
P1075 GCD not equal LCM
Language
C++20 (G++ 13.2.0)
Submit At
2024-10-03 09:01:08
Judged At
2024-11-11 02:51:30
Judged By
Score
100
Total Time
30ms
Peak Memory
2.219 MiB