Submission #19308

#TimeUsernameProblemLanguageResultExecution timeMemory
19308onjo0127Α (kriii4_P1)C++98
0 / 100
0 ms1084 KiB
#include<stdio.h> #define N 1000000007 long long int a,b,ans=1; long long int dt[60]; int main() { int z; scanf("%lld %lld",&a,&b); dt[0]=1; dt[1]=a; for(z=2;z!=60;z++) dt[z]=(dt[z-1]*dt[z-1])%N; for(z=1;z!=60;z++){ if(b%2)ans=(ans*dt[z])%N; b/=2; } printf("%lld",ans); return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...