# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
19292 | xdoju | Α (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>
using namespace std;
const int MOD = 1000000007;
void proc() {
long long r, n;
scanf("%lld", &r);
scanf("%lld", &n);
long long ret = 1;
while (n > 0) {
if (n % 2 > 0) {
ret = (ret * r) % MOD;
}
r = (r * r) % MOD;
n /= 2;
}
printf("%lld", ret);
}
int main() {
proc();
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |