# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
19335 | gs13068 | Α (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>
const int p = 1000000007;
int f(int x, int y)
{
return y & 1 ? (long long)f(x, y ^ 1)*x%p : y ? f((long long)x*x%p, y >> 1) : 1;
}
int main()
{
long long a, b;
scanf("%lld%lld", &a, &b);
printf("%d", f(a%p, b % (p - 1)));
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |