# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
19374 |
2016-02-24T10:52:13 Z |
camille |
Α (kriii4_P1) |
C++14 |
|
0 ms |
1716 KB |
#include <iostream>
using namespace std;
typedef long long lld;
lld a,x,mod=1e9+7;
lld foo(lld idx){
if(idx==1) return a;
if(idx%2) return foo(idx/2)*foo(idx/2)*a%mod;
return foo(idx/2)*foo(idx/2)%mod;
}
int main(){
cin>>a>>x;
a%=mod;
cout<<foo(x)<<endl;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
1716 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |