# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
19525 | Namnamseo | Α (kriii4_P1) | C++14 | 0 ms | 1716 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 <iostream>
using namespace std;
typedef long long ll;
ll a,b;
int M=int(1e9)+7;
ll pow(ll a,ll b){
if(b==0) return 1;
ll ret=pow(a,b/2);
ret=(ret*ret)%M;
if(b&1) ret=(ret*a)%M;
return ret;
}
int main()
{
cin>>a>>b;
a%=M; b%=(M-1);
cout<<pow(a,b);
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |