# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
19632 | 201023777 | Α (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>
long long a,b,c;
long long yukariko(long long A,long long B){
if(B==0) return (long long)1;
if(B==1) return A%c;
if(B%2==0) return yukariko((A*A)%c,B/2);
else return (A*yukariko((A*A)%c,(B-1)/2))%c;
}
int main(){
c=1000000007;
scanf("%lld%lld",&a,&b);
printf("%lld",yukariko(a,b));
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |