Submission #19545

#TimeUsernameProblemLanguageResultExecution timeMemory
19545joojisΑ (kriii4_P1)C++98
0 / 100
0 ms1084 KiB
#include <cstdio> int main () { long long unsigned a, x; scanf("%llu %llu", &a, &x); long long unsigned answer=1; while (x>0) { answer *= x%2 ? a : 1; answer %= 1000000007; x/=2; a=a*a; a %= 1000000007; } printf("%llu\n", answer % 1000000007); return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...