# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
20152 | veckal | Α (kriii4_P1) | C11 | 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 ll;
ll pow(ll base, ll exp) {
if (exp == 1) return base;
ll ret = pow(base, exp>>1);
ret = (ret * ret) % MOD;
if (exp&1) ret = (ret * base) % MOD;
return ret;
}
ll a, x;
int main() {
scanf("%lld%lld", &a, &x);
printf("%lld\n", pow(a%MOD, x));
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |