This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
/* :) */
#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define ll long long
#define pll pair<ll, ll>
const int sz = 1e5+5;
int main()
{
ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
ll n, k;
cin>>n>>k;
n = 1<<n;
if (k%2==0){
cout<<n-(k/2)+1;
}
else {
cout<<k/2+1;
}
}
// 1 2 3 4 5 28 29 30 31 32
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |