# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
19344 | ilbbke | Α (kriii4_P1) | C++98 | 0 ms | 1720 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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%M,1);
printf("%lld\n",ans);
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |