# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
19647 | 2016-02-25T03:30:34 Z | joinsung | Α (kriii4_P1) | C++ | 0 ms | 1716 KB |
#include <iostream> using namespace std; #define MOD 1000000007 long long pow[100]; int main() { long long a, x; cin >> a >> x; long long s = 1; for (int i = 0; i <= 64; i++) { pow[i] = s; s = s * s % MOD; } long long res = 1; int bit = 0; while (a > 0) { if (a & 1 == 1) res = (res * pow[bit]) % MOD; bit++; a >>= 1; } cout << res << endl; }
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 1716 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |