QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#333512#5602. Sun and Moonjoelgun14#WA 0ms3688kbC++14651b2024-02-20 04:08:082024-02-20 04:08:08

Judging History

你现在查看的是最新测评结果

  • [2024-02-20 04:08:08]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3688kb
  • [2024-02-20 04:08:08]
  • 提交

answer

#include <bits/stdc++.h>
#define fi first
#define se second
#define bit(x) (1LL << (x))
#define getbit(x, i) (((x) >> (i)) & 1)
#define ALL(x) (x.begin(), x.end())
using namespace std;

template <typename T1, typename T2> bool maxi(T1 &a, T2 b) {
    if (a < b) {a = b; return true;} return false;
}

template <typename T1, typename T2> bool mini(T1 &a, T2 b) {
    if (a > b) {a = b; return true;} return false;
}

const int N = 2e5 + 5;
const int oo = 1e9;
const long long ooo = 1e18;


int main() {
    int a, b;
    int c, d;
    cin >> a >> b >> c >> d;
    int lcm = b/__gcd(b,d)*d;
    cout << lcm-max(a,c) << "\n";
}

详细

Test #1:

score: 100
Accepted
time: 0ms
memory: 3688kb

input:

3 10
1 2

output:

7

result:

ok single line: '7'

Test #2:

score: -100
Wrong Answer
time: 0ms
memory: 3540kb

input:

27 32
39 41

output:

1273

result:

wrong answer 1st lines differ - expected: '453', found: '1273'