OJ-Problems-Source/CodeVS/1842_冰封.c

19 lines
268 B
C
Raw Normal View History

2016-07-06 14:28:18 +08:00
/*
:
:p1842
*/
#include <stdio.h>
int dfs(int x){
if(x >= 0) return 5;
return dfs(x + 1) + dfs(x + 2) + 1;
}
int main(int argc, char* argv[]){
int x;
scanf("%i", &x);
printf("%i", dfs(x));
return 0;
}