Number Transformation Solution
Codeforces Round #786 (Div 3)
Solution :
#include <bits/stdc++.h>
#define ll long long int
using namespace std;
int main()
{
ll t = 1;
cin >> t;
while (t--)
{
ll x, y;
cin >> x >> y;
if (y % x == 0)
{
cout << y / x << " " << 1 << "\n";
}
else
{
cout << 0 << " " << 0 << "\n";
}
}
}
Comments
Post a Comment