Submission #19649

#TimeUsernameProblemLanguageResultExecution timeMemory
19649king7282Α (kriii4_P1)C++14
0 / 100
0 ms1084 KiB
#include <stdio.h> int main(void) { long long a, x, result = 1; scanf("%lld %lld", &a, &x); while(x > 0) { long long i, t = a; for(i = 2; i <= x; i *= 2) t = (t * t) % 1000000007; result = (result * t) % 1000000007; x -= i / 2; } printf("%lld\n", result); return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...