# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
19383 |
2016-02-24T11:06:50 Z |
fredldh |
Α (kriii4_P1) |
C++ |
|
0 ms |
1084 KB |
#include<stdio.h>
#define mod(a) ((a)%1000000007)
typedef long long int lld;
lld pow(lld a, lld x) {
if(!x) return 1;
lld P = pow(a, x/2);
if(x&1) return mod(a*mod(P*P));
return mod(P*P);
}
int main() {
lld a, x;
scanf("%lld%lld", &a, &x);
a = mod(a); x = mod(x);
printf("%lld\n", pow(a,x));
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
1084 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |