Untitled
unknown
plain_text
2 years ago
283 B
3
Indexable
#include <iostream> int main() { int n = 0; int x = 0; int y = 0; std::cin >> n; for (int i = 0; i < n; i++) { std::cin >> x >> y; if (y % x != 0) { std::cout << 0 << ' ' << 0 << '\n'; } else { std::cout << 1 << " " << y / x << '\n'; } } }
Editor is loading...
Leave a Comment