# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
19343 |
2016-02-24T10:14:48 Z |
min050820 |
Α (kriii4_P1) |
C++14 |
|
0 ms |
1716 KB |
#include <iostream>
using namespace std;
long long a,x;
const long long mod=1000000007;
long long pow(long long N,long long P){
if(P<2) return N%mod;
long long tmp=pow(N,P/2);
if(P&1){
return (((N * tmp)%mod) * tmp)%mod;// P%2==1
}
else{
return (tmp * tmp)%mod;// P%2==0
}
}
int main()
{
cin >> a >> x;
a%=mod;
x%=mod;
cout << pow(a,x);
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
1716 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |