> Did you solved this problem? @salem
Of course not, codechef problems are not interesting to me.
Even if I did, I would be in no mood to just hand all the goodness over to all the wanabies.
#include <iostream>
inlinebool f(long& a, long b) {
if (a % b == 0 || a / b > 1) returnfalse;
a -= b;
returntrue;
}
int main() {
int t;
std::cin >> t;
while (t--) {
long n, m;
std::cin >> n >> m;
bool ari = true;
while (n <= m ? f(m, n) : f(n, m))
ari = !ari;
std::cout << (ari ? "Ari\n" : "Rich\n");
}
}