Untitled
Anonymous
plain_text
11/26/2023 7:46 AM
380 B
16
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