Untitled

 avatar
unknown
c_cpp
2 years ago
361 B
3
Indexable
using namespace std;
#include <iostream>

int main()
{
	int n;
	int x;
	int y;

	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> x >> y;
		if (y % x == 0){
			if (y == x) {
				cout << 1 << " " << 1 << endl;
			}
			else {
				cout << 1 << " " << y / x << endl;
			}
		}
		if (y % x != 0) {
			cout << 0 << " " << 0 << endl;
		}
	}
}
Editor is loading...
Leave a Comment