BETA

Submissions : 1866 Accuracy :

41

Replace the Bit
       

Given two numbers n and k, change the kth bit of the number n to '0' if it is  '1', else return the number n itself.

Input:
First line of the input contains an intger T denoting the number of test case. Each test contains a single line containg two space seperated integers n and k respectively.

Output:
For each test case output a single integer.

Constraints:
1<=T<=100
1<=N<=106

Example:
Input:
2
13 3
13 2
Output:
13
9

Explanation:

Test Case 1: n = 13 ('1101') k=3
return 13

Test Case 2: n = 13('1101') k=2
return 9('1001')

**For More Examples Use Expected Output**


Set Default Code

					   
Result:
It is recommended to test your code before clicking 'Submit' button!



                   



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.