Submission #19677

# Submission time Handle Problem Language Result Execution time Memory
19677 2016-02-25T04:27:56 Z onjo0127 괄호 (kriii4_R) C++14
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;
	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+(dt[z-2]*a)%N)%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 -