/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Wrong Answer 1ms 392.0 KiB
#2 Wrong Answer 7ms 580.0 KiB

Code

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

namespace solve {
    namespace test_case {
        void main() {
            int a, b, c;
            cin >> a >> b >> c;
            int x = __gcd(__gcd(a, b), c);
            cout << (abs(a - b) + abs(b - c) + abs(c - a)) / x << '\n';
        }
    }

    void main() {
        ios::sync_with_stdio(false);
        cin.tie(nullptr);
        int t;
        cin >> t;
        while (t--) {
            test_case::main();
        }
    }
}

signed main() {
    solve::main();
}

Information

Submit By
Type
Submission
Problem
P1061 Bring equality
Contest
Brain Booster #4
Language
C++17 (G++ 13.2.0)
Submit At
2024-07-14 16:02:39
Judged At
2024-11-11 03:24:56
Judged By
Score
0
Total Time
7ms
Peak Memory
580.0 KiB