# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
19307 | imsifile | Α (kriii4_P1) | C++98 | 0 ms | 1084 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<stdio.h>
#define mod 1000000007
typedef long long lld;
lld a, b;
lld exp(lld a, lld b){
if(b==0)return 1;
lld k=exp(a, b/2);
k=(k*k)%mod;
if(b%2)k=(k*a)%mod;
return k;
}
int main(){
scanf("%lld%lld", &a, &b), a%=mod;
printf("%lld", exp(a,b));
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |