# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
19605 |
2016-02-25T01:06:11 Z |
javelinsman |
Α (kriii4_P1) |
C++14 |
|
0 ms |
1716 KB |
#include<iostream>
#include<algorithm>
using namespace std;
typedef long long ll;
const ll MOD = 1e9+7;
ll go(ll x,ll y){
if(y==0) return 1;
if(y==1) return x;
if(y%2) return (go(x,y-1)*x)%MOD;
ll h = go(x,y/2);
return h*h%MOD;
}
int main(){
ll a,x;
cin>>a>>x;
cout<<go(a,x);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
1716 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |