Submission #19315

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