Submission #19597

#TimeUsernameProblemLanguageResultExecution timeMemory
19597nona1314Α (kriii4_P1)C++14
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...