Submission #19784

# Submission time Handle Problem Language Result Execution time Memory
19784 2016-02-25T05:36:42 Z onjo0127 괄호 (kriii4_R) C++
0 / 100
0 ms 8896 KB
#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 time Memory Grader output
1 Incorrect 0 ms 8896 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Halted 0 ms 0 KB -