Code:
t=int(input());
i=0;
while(i<t):
a=int(input());
k=int(input());
w=bin(a);
w=w[2:];
if(w[len(w)-k-1]=='1'):
print("Yes");
else:
print("No");
i=i+1;
Python for beginners: https://www.youtube.com/watch?v=egq7Z...
t=int(input());
i=0;
while(i<t):
a=int(input());
k=int(input());
w=bin(a);
w=w[2:];
if(w[len(w)-k-1]=='1'):
print("Yes");
else:
print("No");
i=i+1;
Python for beginners: https://www.youtube.com/watch?v=egq7Z...
0 Comments:
Post a Comment