Submission #19398

# Submission time Handle Problem Language Result Execution time Memory
19398 2016-02-24T11:16:48 Z Qwaz Α (kriii4_P1) C++14
0 / 100
0 ms 1084 KB
#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
1 Incorrect 0 ms 1084 KB Output isn't correct
2 Halted 0 ms 0 KB -