/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 2ms 480.0 KiB
#2 Accepted 3ms 516.0 KiB
#3 Accepted 7ms 480.0 KiB
#4 Accepted 46ms 1.285 MiB
#5 Accepted 56ms 2.117 MiB
#6 Accepted 55ms 2.078 MiB

Code

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

#define FAST ios_base::sync_with_stdio(false);cin.tie(NULL);
using ll = long long;

int main() {
  FAST;
  
  int tc = 1, ti;
  cin >> tc;

  for (ti = 1; ti <= tc; ++ti) {
    ll x, y, ans;
    cin >> x >> y;
    ans = x*y - min(x, y);
    cout << ans << "\n";
  }

  return 0;
}

Information

Submit By
Type
Submission
Problem
P1075 GCD not equal LCM
Language
C++17 (G++ 13.2.0)
Submit At
2024-10-04 19:02:25
Judged At
2024-11-11 02:42:14
Judged By
Score
100
Total Time
56ms
Peak Memory
2.117 MiB