# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
19398 | Qwaz | Α (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>
typedef long long ll;
const int MOD = 1000000007;
ll a, x;
int main() {
ll res = 1;
scanf("%lld%lld", &a, &x);
a = a % MOD;
x = x % MOD;
while (x) {
if (x & 1) res = res * a % MOD;
a = a * a % MOD;
x >>= 1;
}
printf("%lld\n", res);
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |