Submission #19931

# Submission time Handle Problem Language Result Execution time Memory
19931 2016-02-25T07:22:37 Z ilbbke 동전 (kriii4_E) C++
0 / 100
0 ms 1084 KB
#include<stdio.h>
#define M 1000000007

int n;
long long dy[255];

int main()
{
	scanf("%d",&n);
	dy[1]=1; dy[2]=1;
	int i,j;
	for(i=3;i<=n;i++){
		for(j=i-2;j>=1;j--){
			dy[i]=(dy[i]+dy[j]*2%M)%M;
		}
	}
	printf("%lld",dy[n]);
	return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 1084 KB Output is correct
2 Correct 0 ms 1084 KB Output is correct
3 Correct 0 ms 1084 KB Output is correct
4 Correct 0 ms 1084 KB Output is correct
5 Correct 0 ms 1084 KB Output is correct
6 Incorrect 0 ms 1084 KB Output isn't correct
7 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Halted 0 ms 0 KB -