Submission #19649

# Submission time Handle Problem Language Result Execution time Memory
19649 2016-02-25T03:45:58 Z king7282 Α (kriii4_P1) C++14
0 / 100
0 ms 1084 KB
#include <stdio.h>

int main(void)
{
	long long a, x, result = 1;
	scanf("%lld %lld", &a, &x);

	while(x > 0) {
		long long i, t = a;

		for(i = 2; i <= x; i *= 2)
			t = (t * t) % 1000000007;

		result = (result * t) % 1000000007;
		x -= i / 2;
	}

	printf("%lld\n", result);
	return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 1084 KB Output isn't correct
2 Halted 0 ms 0 KB -