Submission #19477

# Submission time Handle Problem Language Result Execution time Memory
19477 2016-02-24T13:42:14 Z noslaak Σ (kriii4_P2) C++
0 / 100
28 ms 1716 KB
#include <iostream>

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

		std::cout << acc << std::endl;
	}

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