Untitled
unknown
plain_text
3 years ago
321 B
3
Indexable
#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;
}
}Editor is loading...