forked from deepakgarg0802/MyCompetitiveCodingSolutions
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcandy123.cpp
44 lines (36 loc) · 753 Bytes
/
candy123.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#include<bits/stdc++.h>
#define MAX 1000000
#define ll long long
#define DEBUG(x) do { std::cout << #x << ": " << x << " "; } while (0)
using namespace std;
int main()
{
long long int t,n,q,i,j,l,r,b,x,y,temp,count,ans,len;
cin>>t;
while(t--){
cin>>l>>b;
x=y=0;
for(i=1;;++i){
x+=i;
//DEBUG(x);
if(x>l){
q=1;
break;
}
++i;
y+=i;
//DEBUG(y);
if(y>b){
q=2;
break;
}
}
if(q==1){
cout<<"Bob\n";
}
else{
cout<<"Limak\n";
}
}
return 0;
}