# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
19649 | king7282 | Α (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>
int main(void)
{
long long a, x, result = 1;
scanf("%lld %lld", &a, &x);
while(x > 0) {
long long i, t = a;
for(i = 2; i <= x; i *= 2)
t = (t * t) % 1000000007;
result = (result * t) % 1000000007;
x -= i / 2;
}
printf("%lld\n", result);
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |