/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Wrong Answer 1ms 324.0 KiB
#2 Wrong Answer 1ms 324.0 KiB

Code

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define endl '\n';


bool custom(pair<int,int>a, pair<int,int>b){

    if(a.first == b.first){
        return a.second > b.second;
    }

    return a.first < b.first;
}

void tc(){
    int t;
    cin >> t;
    while (t--){


        

        ll a,u;
        cin >> a >> u;

        if(u == 0){
            cout << "Game #"<< t+1 << ": "<< "0/1" << endl;
        }
        else if(a == u){
            cout << "Game #"<< t+1 << ": " << "1/1" << endl;

        }
        else{
            ll gcd = __gcd(a,u);

            cout << "Game #"<< t+1 << ": "<< u/gcd << '/' << a/gcd << endl;
        }

        
        
        
    }
  
}


int main()
{

    ios::sync_with_stdio(0);
    cin.tie(0);

    tc();



    return 0;
}

Information

Submit By
Type
Submission
Problem
P1001 Achievement-Unlocked
Language
C++20 (G++ 13.2.0)
Submit At
2024-10-02 11:13:35
Judged At
2024-11-11 02:51:41
Judged By
Score
0
Total Time
1ms
Peak Memory
324.0 KiB