1 solutions

  • 1
    @ 2025-6-6 16:47:27
    #include<bits/stdc++.h>
    using namespace std;
    
    int main() {
        int a, b, c; cin >> a >> b >> c;
        if(a > b)  swap(a, b);
        if(a > c)  swap(a, c);
        if(b > c)  swap(b, c);// 排序 a, b, c
        cout << a / __gcd(a, c) << "/" << c / __gcd(a, b); // 约分
        return 0;
    }
    
    
    • 1

    Information

    ID
    1352
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    7
    Tags
    # Submissions
    38
    Accepted
    11
    Uploaded By