The Product Mystery Solution || Codechef Starters - 27

       

The Product Mystery Solution 

Codechef Starters - 27
Problem Code : PRODUCT

Solution :

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

void solve()
{
    ll b, c;
    cin >> b >> c;
    ll a = (c) / __gcd(b, c);
    cout << a << "\n";
}

int main()
{
    ll t;
    cin >> t;
    while (t--)
    {
        solve();
    }
}

Comments