Hi !! i am solving the bear and candy problem got almost everything correct but I cant able to understand where I went wrong .
////////////////////////////////////////////////////////////
include <bits/stdc++.h>
using namespace std;
void ans(int a,int b){
int cnt =1;
int maxi = max(a,b);
int limak=0,bob=0;
while(cnt = (a+b)){
if(cnt%2==1){
limak += cnt;
if(limak>a){
cout<<"Bob"<<endl;
break;
}
}else{
bob+=cnt;
if(bob>b){
cout<<"Limak"<<endl;
}
break;
}
cnt++;
}
}
int main(){
int t;
cin>>t;
while(t–){
int a,b;
cin>>a>>b;
ans(a,b);
}
return 0;
}