| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1308715 | maya_s | Rack (eJOI19_rack) | C++20 | 1 ms | 576 KiB |
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
ios_base::sync_with_stdio(false); cin.tie(NULL);
ll n, k; cin >> n >> k;
ll p = (1ll << (n-1)), x = 0, d = 2;
while(p) {
if(k % d > d / 2 || k % d == 0) x += p;
p /= 2, d *= 2;
}
cout << x+1;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
