# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
19546 | joojis | Α (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 <cstdio>
const long long unsigned MOD = 1000000007;
int main ()
{
long long unsigned a, x;
scanf("%llu %llu", &a, &x);
long long unsigned answer=1;
a %= MOD;
while (x>0) {
answer *= x%2 ? a : 1;
answer %= MOD;
x/=2;
a = (a*a) % MOD;
}
printf("%llu\n", answer);
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |