Skip to content

Commit 651c6e6

Browse files
Chef Wars - Return of the Jedi
1 parent 7bf761c commit 651c6e6

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# https://www.codechef.com/AUG20B/problems/CHEFWARS
2+
for _ in range(int(input())):
3+
a1,a2=map(int,input().split())
4+
k=0
5+
while a2:
6+
k+=a2
7+
a2//=2
8+
if a1>k:
9+
print('0')
10+
else:
11+
print('1')

0 commit comments

Comments
 (0)