# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
19484 | zych1751 | Α (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>
int main()
{
long long a, x;
long long result = 1;
const int INF = 1e9+7;
scanf("%lld %lld", &a, &x);
a %= INF;
while(x)
{
if(x&1)
result = (result*a)%INF;
x /= 2;
a = (a*a) % INF;
}
printf("%lld", result);
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |