题解 | #统计每个月兔子的总数#
统计每个月兔子的总数
https://www.nowcoder.com/practice/1221ec77125d4370833fd3ad5ba72395
#include <stdio.h> int fib(int n) { if(n==1||n==2) return 1; else return fib(n-1)+fib(n-2); } int main() { int n=0; while(scanf("%d",&n)!=EOF) { printf("%d\n",fib(n)); } return 0; }