Submission #1100861

#TimeUsernameProblemLanguageResultExecution timeMemory
1100861vincentbucourt1Rack (eJOI19_rack)C++14
40 / 100
1 ms508 KiB
#include <bits/stdc++.h> using namespace std; #define int long long int N, numIter; int ans = 0; signed main() { cin >> N >> numIter; numIter--; for (int i = 0; i <= 20; i++) { bool filled = (numIter & (1 << i)); ans += (1 << (N - i - 1)) * filled; } cout << ans+1 << "\n"; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...