Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
321 B
0
Indexable
Never
#include <iostream>
#include <cmath>
using namespace std;
int main() {
	int n, x, y, a, d;
	float b;
	float c;
	cin >> n;
	for (int i = 0; i < n; i++){
		cin >> x >> y;
		b = float(x) /y;
		if (b == x, y && x / y != 0) {
			cout << 1 << ' ' << y / x << endl;
		}
		else cout << 0 << ' ' << 0 << endl;
	}
}