제출 #19598

#제출 시각아이디문제언어결과실행 시간메모리
19598nona1314Α (kriii4_P1)C++98
0 / 100
0 ms1084 KiB
#include <cstdio> using namespace std; const long long MMOD = 1000000007; int main() { long long A, X; scanf("%lld%lld", &A, &X); long long ans = 1; while (X > 0) { if ((X & 1) > 0) ans = (ans*A) % MMOD; X = X >> 1; A = (A*A) % MMOD; } printf("%lld\n", ans); return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...