Reset bits
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 32 megabytes
Given two integers n and k. Reset (set to zero) the last k bits in the number n, and print the result. It is recommended to find solution without loops.
Input
Two numbers n (0 ≤ n ≤ 2^31
- 1) and k (0 ≤ k ≤ 30).
Output
Print the result of resetting k last bits.
Examples
Input #1
Answer #1
Submissions 7K
Acceptance rate 51%