Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int n,a,p,k;
- int main()
- {
- cin>>n>>k;
- p=1;
- p<<=k;
- p=p-1;
- //cout<<p<<' ';
- n=n&p;
- cout<<n;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement