Submission #19784

#TimeUsernameProblemLanguageResultExecution timeMemory
19784onjo0127괄호 (kriii4_R)C++98
0 / 100
0 ms8896 KiB
#include<stdio.h> #define N 1000000007 long long int dt[1000005]; int main() { long long int a,b,z,x; scanf("%lld %lld",&a,&b); dt[1]=a; dt[2]=(a*a+a)%N; for(z=3;z<=b;z++){ dt[z]=(dt[z-1]*a)%N; for(x=1;x!=z;x++) dt[z]=(dt[z]*dt[x])%N; } printf("%d",dt[b]); return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...