# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
19340 |
2016-02-24T10:10:03 Z |
ilbbke |
Α (kriii4_P1) |
C++ |
|
0 ms |
1720 KB |
#include<bits/stdc++.h>
#define ll long long
#define M 1000000007
using namespace std;
ll a,b,ans=1;
void f(ll c,ll x){
if(x>b) return;
f(c*c%M,x*2);
if(x<=b){
ans=ans*c%M;
b-=x;
}
}
int main()
{
scanf("%lld%lld",&a,&b);
f(a,1);
printf("%lld\n",ans);
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
1720 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |