# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
19481 | sujin | Α (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>
#define MOD 1000000007
long long pow(long long a, long long x)
{
if (x == 0)
return 1LL;
long long h = pow(a, x / 2);
return h * h % MOD * ((x & 1) ? a : 1) % MOD;
}
int main()
{
long long a, x;
scanf("%lld %lld", &a, &x);
a %= MOD;
printf("%lld", pow(a, x));
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |