Codechef22

 https://www.codechef.com/AUG20B/problems/CHEFWARS:

for _ in range(int(input())):

    n,k=input().split()

    n=int(n)

    k=int(k)

    

    while k!=0:

        n=n-k

        k=k//2

    if n>0:

        print(0)

    else:

        print(1)

        

     

Comments