Untitled
unknown
c_cpp
2 years ago
291 B
2
Indexable
#include <iostream> using namespace std; int main() { setlocale(LC_ALL, "Russian"); int n, x, y, a; cin >> n; for (int i = 0; i < n; i++) { cin >> x >> y; if (y % x != 0) { cout << 0 << ' ' << 0 << endl; } else { cout << 1 << ' ' << y /x << endl; } } }
Editor is loading...
Leave a Comment