Submission #19388

#TimeUsernameProblemLanguageResultExecution timeMemory
19388fredldhΑ (kriii4_P1)C++98
100 / 100
0 ms1084 KiB
#include<stdio.h> #define mod(a) ((a)%1000000007) typedef long long int lld; lld pow(lld a, lld x) { if(!x) return 1; lld P = pow(a, x/2); if(x&1) return mod(a*mod(P*P)); return mod(P*P); } int main() { lld a, x; scanf("%lld%lld", &a, &x); a = mod(a); printf("%lld\n", pow(a,x)); return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...