Untitled

 avatar
unknown
c_cpp
2 years ago
349 B
2
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