#include <stdio.h>
int memo[100001]={};
int f(int n)
{
if(memo [n]!=0)
{
return memo[n];
}
if(n==1||n==2)
{
return memo[n]=1;
}
else if(n==3)
{
return memo[n]=2;
}
else
{
return memo[n]=(f(n-1)+f(n-2))%10009;
}
}
int main()
{
int n;
scanf("%d",&n);
printf("%d",f(n));
}
#include <stdio.h>
int memo[15][15]={};
int f(int r,int n)
{
if(memo[r][n]!=0)
{
return memo[r][n];
}
if(r==0||n==0) return memo[r][n]=n;
return memo[r][n]=f(r,n-1)+f(r-1,n);
}
int main()
{
int r,n;
while( scanf("%d %d", &r, &n) != EOF )
printf("%d\n", f(r, n));
}
C -> 자료구조
JAVA -> GUI
Python
포인터
*/
/*
#include <stdio.h>
int main()
{
int a=5;
int* pa= &a;
//scanf("%d",&a);
// printf("a = %d \n",a);
// printf("&a = %d \n",&a);
printf("%d\n",pa);
printf("%d",*pa);
}
temp tmp t
*/
/*
#include <stdio.h>
void myswap(int* a,int* b)
{
int t;
if(*a>*b)
{
t=*a;
*a=*b;
*b=t;
}
}
main()
{
int a, b;
scanf("%d%d", &a, &b);
myswap(&a, &b);
printf("%d %d", a, b);
}
----------------------------------------------------------
#include <stdio.h>
char *mysubstr(char *str, int start, int count)
{
scanf("%s\n %d %d",&str,&start,&count);
arr=arr[start]+
}
int main()
{
char arr[101];
scanf("%s",arr[101]);
*mysubstr(arr);
printf("%s",arr);
}