Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Svastikkka/642f6753472564105ad924245c793e40 to your computer and use it in GitHub Desktop.
Save Svastikkka/642f6753472564105ad924245c793e40 to your computer and use it in GitHub Desktop.
t=int(input())
for i in range(t):
h,p=map(int,input().split())
while h>0:
h = h - p
p = p // 2
if p>h:
print(1)
break
elif p==0 and h!=0:
print(0)
break
elif p==0 and h==0:
print(1)
break
#print(h," ",p)
@Svastikkka
Copy link
Author

Chef Wars - Return of the Jedi Problem Code: CHEFWARS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment