# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
19599 |
2016-02-25T00:23:58 Z |
nona1314 |
Α (kriii4_P1) |
C++ |
|
0 ms |
1084 KB |
#include <cstdio>
using namespace std;
const long long MMOD = 1000000007;
int main() {
long long A, X;
scanf("%lld%lld", &A, &X);
long long ans = 1;
while (X > 0) {
if ((X & 1) > 0) ans = (ans*A) % MMOD;
X/=2;
A = (A * A) % MMOD;
}
printf("%lld\n", ans);
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
1084 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |