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

PLEASE HELP :pray::pray:

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;
}

}

}

1 Like

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: CodeChef: Practical coding for everyone