Задачи
Обрезать старшие биты
include <bits/stdc++.h>
using namespace std;
typedef long long ll; typedef long double ld;
void solve() {
int n,k;
cin >> n >> k;
int ans = (1<<k-1);
cout << (n&ans) << '\n';
}
int main() { iosbase::syncwith_stdio(false), cin.tie(NULL), cout.tie(NULL); solve();
return 0;
}
include <bits/stdc++.h>
using namespace std; int main () { int k,n,ans; cin>>n>>k; n&=(1<<k)-1; cout<<n; }