Please find my mistake,am getting WA on submission MATCHES QN MAY LONG CHALLENGE

help

#1

PLEASE HELP :pray::pray:
https://www.codechef.com/MAY19B/submit/MATCHS

heres my code
https://www.codechef.com/viewsolution/24257100

#include
#define ll long long
using namespace std;
int main() {

ll int n,m,a,b;
ll int t;
cin>>t;
while(t–){

cin>>n>>m;

if(n!=m and n%m!=0 and m%n!=0){

if(n>m){
a=n;
b=m;
}
else{
a=m;
b=n;
}

if(a%2==1){
//cout<<a<<" "<<b;
if((((a+1)/2)+1)<=b and b<=(((a+1)/2)+a)){
cout<<“Rich”<<endl;
}
else{
cout<<“Ari”<<endl;
}

}

else{
//cout<<a<<" "<<b;
if(((a/2)+1)<=b and b<=((a/2)+a)){
cout<<“Rich”<<endl;
}
else{
cout<<“Ari”<<endl;
}

}
}

else{
cout<<“Ari”<<endl;
}

}

}


#2

#3

the problem came from your test case
if((((a+1)/2)+1)<=b and b<=(((a+1)/2)+a)).
you do not have a correct expression
I had a similar logic: https://www.codechef.com/viewsolution/24246949