# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
19529 |
2016-02-24T16:13:55 Z |
metadata |
Α (kriii4_P1) |
C++14 |
|
0 ms |
1084 KB |
#include<cstdio>
#define MOD 1000000007
long long mod_bp[65];
long long A,X,r;
int main(){
scanf("%lld %lld",&A,&X);
mod_bp[0]=A%MOD;
int i;
for(i=1;i<64 && (1<<i)<=X;i++){
mod_bp[i]=(mod_bp[i-1]*mod_bp[i-1])%MOD;
}
for(i=0,r=1;i<64 && (1<<i)<=X;i++){
if((1<<i)&X){
r*=mod_bp[i];
r%=MOD;
}
}
printf("%lld",r);
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
1084 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |