Submission #19451

# Submission time Handle Problem Language Result Execution time Memory
19451 2016-02-24T12:46:51 Z noslaak Α (kriii4_P1) C++
0 / 100
0 ms 1716 KB
#include <iostream>

const int LN = 1000000007;
int main()
{
	while(!std::cin.eof())
	{
		long long A, X, acc = 1;
		std::cin >> A >> X;
		
		while(X)
		{
			A %= LN;
			if(X%2)
				acc = (acc*A)%LN;
			
			A = A*A;
			X /= 2;
		}

		std::cout << acc;
	}

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