# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
19295 |
2016-02-24T09:02:47 Z |
xdoju |
Α (kriii4_P1) |
C++14 |
|
0 ms |
1084 KB |
#include <cstdio>
using namespace std;
const long long MOD = 1000000007ll;
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 |
1 |
Incorrect |
0 ms |
1084 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |