# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
693219 | 2023-02-02T13:12:20 Z | testttt | Rack (eJOI19_rack) | C++14 | 1000 ms | 212 KB |
#include <bits/stdc++.h> using namespace std; #define ll long long const ll mod = 1e9 + 7; long long exp(long long x, long long y, long long p) { long long res = 1; x %= p; while (y) { if (y & 1) { res *= x; res %= p; } x *= x; x %= p; y >>= 1; } return res; } main(){ ll n , k;cin >> n >> k; -- k; ll ans = 1; for(int i = 0;i < 63;i ++){ if((1 << i) & k){ ans += exp(2 , n - i - 1 , mod); ans%=mod; } } cout << ans << endl; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1083 ms | 212 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1083 ms | 212 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1083 ms | 212 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |