Submission #446710

#TimeUsernameProblemLanguageResultExecution timeMemory
446710fuad27Rack (eJOI19_rack)C++14
100 / 100
10 ms236 KiB
#include<bits/stdc++.h> using namespace std; #define mod 1000000007ll #define int long long int32_t main () { int n, k; cin >> n >> k; int ans = 0; k--; for(int i = 0;i<n;i++) { ans = (((ans*2))%mod + k%2)%mod; k/=2; } cout<<(++ans)%mod<<endl; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...