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