QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#631814#5602. Sun and Moonenze114514WA 0ms3580kbC++20767b2024-10-12 10:25:282024-10-12 10:25:28

Judging History

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

  • [2024-10-12 10:25:28]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3580kb
  • [2024-10-12 10:25:28]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;

#define pb push_back

const ld pi = 3.14159265358979323846;
const int mod = (int)1e9 + 7;
const ll INF = 1e18;

template<typename T>
T chmax(T a, T b) {
    return a > b ? a : b;
}

template<typename T>
T chmin(T a, T b) {
    return a > b ? b : a;
}

const int N = (int)2e5 + 1, M = N * 2;

void solve() {
    int ds, ys, dm, ym;
    cin >> ds >> ys >> dm >> ym;

    cout << abs(ys - ds) * abs(ym - dm) / __gcd(abs(ys - ds), abs(ym - dm)) << endl;
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(0);

    int t = 1;
    // cin >> t;

    while (t--) {
        solve();
    }

    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

3 10
1 2

output:

7

result:

ok single line: '7'

Test #2:

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

input:

27 32
39 41

output:

10

result:

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