Submission #19597

# Submission time Handle Problem Language Result Execution time Memory
19597 2016-02-25T00:15:37 Z nona1314 Α (kriii4_P1) C++14
0 / 100
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 = X >> 1;
								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 -