The problem: Problem (Reserve link)
#include <bits/stdc++.h>
using namespace std;
int main() {
int c, m, n;
bool stan;
cin >> c;
while (c --) {
stan = true;
cin >> m >> n;
if (m < n) swap(m, n);
while (n && m / n == 1) {
stan = !stan;
m -= n;
swap(m, n);
}
puts(stan ? "Stan wins" : "Ollie wins");
}
return 0;
}
It passes the example, but not accepted.
Please give a counterexample and fix the program.




