Submission #19484

#TimeUsernameProblemLanguageResultExecution timeMemory
19484zych1751Α (kriii4_P1)C++14
100 / 100
0 ms1084 KiB
#include<cstdio> int main() { long long a, x; long long result = 1; const int INF = 1e9+7; scanf("%lld %lld", &a, &x); a %= INF; while(x) { if(x&1) result = (result*a)%INF; x /= 2; a = (a*a) % INF; } printf("%lld", result); }
#Verdict Execution timeMemoryGrader output
Fetching results...