제출 #19456

#제출 시각아이디문제언어결과실행 시간메모리
19456noslaakΑ (kriii4_P1)C++98
100 / 100
0 ms1716 KiB
#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 << std::endl;
	}

	return 0;
}
#Verdict Execution timeMemoryGrader output
Fetching results...