Submission #19601

# Submission time Handle Problem Language Result Execution time Memory
19601 2016-02-25T00:35:59 Z jeapi Α (kriii4_P1) C++
0 / 100
0 ms 1716 KB
#include<iostream>
using namespace std;
long long Pow(long long a, long long b) {
	if (b == 1) {
		return a;
	}
	long long temp = Pow(a, b / 2);
	long long Temp = temp*temp % 1000000007;
	if (b % 2 == 0) {
		return Temp;
	}
	return (Temp*a) % 1000000007;

}
int main() {
	long long a, b;
	cin >> a >> b;
	cout<<Pow(a, b)<<endl;
	

	return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 1716 KB Output isn't correct
2 Halted 0 ms 0 KB -