# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
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;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
1716 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |