#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int DP[100];
int fib(int n){
if(n<=1)
return n;
if(DP[n] != -1)
return DP[n];
DP[n] = fib(n-1) + fib(n-2);
return DP[n];
}
int main() {
int n;
scanf("%d", &n);
for (int i=0; i<100; i++)
DP[i] = -1;
DP[0] = 0;
DP[1] = 1;
printf("%d\n", fib(n));
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: