Reset last bits
Problem
Write a program that resets the last k
bits of N
. Display the resulting number.
Arithmetic operations cannot be used in the program, only bit operations must be used!
Input
Given an integer N
and a natural number k
.
Output
Display the number obtained after zeroing.
Examples
Запрещенные операторы: +
; -
; /
; *