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

22 lines
302 B
C
Raw Normal View History

2016-07-06 14:28:18 +08:00
#include<stdio.h>
long res ;
void dfs(int cur){
if(cur == 1 || cur == 0){
res++ ;
return ;
}
dfs(--cur) ;
dfs(--cur) ;
}
int main(int argc, char** argv){
long num ;
scanf("%li", &num) ;
dfs(num) ;
printf("%li", res) ;
// while(1);
return 0;
}