Untitled
Anonymous
c_cpp
11/26/2023 10:36 AM
468 B
14
Indexable
#include <iostream>
using namespace std;
int main()
{
int x, y, n;
cin >> n;
while(n)
{
cin >> x >> y;
if (y % x == 0)
if (x == y)
{
cout << 1 << " " << 1 << endl;
}
else
{
cout << 1 << " " << y/x << endl;
}
if(y % x !=0)
{
cout << 0 << " " << 0 << endl;
}
n--;
}
}Editor is loading...
Leave a Comment