# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
19302 | sys7961 | Α (kriii4_P1) | C++14 | 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>
const long long M = 1000000007;
long long pow(long long n, long long b) {
if (b == 0) {
return 1;
}
long long temp = pow(n, b / 2);
if (b % 2 == 1) {
return temp*temp%M*n%M;
}
return temp*temp%M;
}
int main() {
long long a, x;
scanf("%lld%lld", &a, &x);
printf("%lld", pow(a%M, x));
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |