top of page

소스 코드 제출

공개·회원 52명

2025.06.22

/*

#include <stdio.h>

int s(int k,int n)

{

if(k==0)

{

return n;

}

else if(n==1)

{

return 1;

}

else

{

return s(k-1,n)+s(k,n-1);

}

}

int main()

{

int k,n;

while( scanf("%d %d", &k, &n) != EOF )

printf("%d\n", s(k, n));

}


f(6)

f(4) 3 f(5)

f(2) f(3) 2 f(3) f(4)

1 f(1) f(2)

1 1


int arr[2000]={};


arr[i] : 계산한적있다면 f(i), 계산한적없다면 0

*/


/*

#include<stdio.h>

int arr[2000]= {};

int fibonacci(int N)

{

if(arr[N]!=0) // 계산한적있으면 그거 바로 리턴

{

return arr[N];

}


if(N==1||N==2)

{

return 1;

}

else

{

return arr[N] = (fibonacci(N-1)+fibonacci(N-2))%10009;

}


}

int main()

{

int N;

scanf("%d",&N);

printf("%d",fibonacci(N));

return 0;

}

*/

#include<stdio.h>

int arr[2000]={};

int f(int r,int c)

{

}

int main()

{

int r,c;

scanf("%d %d",&r,&c);

printf("%d",f(n));

return 0;

}

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