top of page

소스 코드 제출

공개·회원 52명

20250425

#include <stdio.h>

int memo[10001] = {0,1,2, };

int cou(int n)

{

if(memo[n]!=0)

{

return memo[n];

}

return memo[n]=cou(n-1)%10000007+cou(n-2)%100000007;

}

int main()

{

int n,m = 2,k;

scanf("%d",&n);

if(n==1)

{

printf("1");

return 0;

}

if(n==2)

{

printf("2");

return 0;

}

k=cou(n);

k=k%100000007;

printf("%d",k);

return 0;

}

2회 조회
주소 : 경기도 용인시 광교중앙로 302 블루 스퀘어 602호
연락처 : 031) 216 - 1546 ,     031) 215 - 1546
사업자등록번호 : 465-92-00916
​학원 등록 제 4603호
bottom of page