0 like 0 dislike
1.4k views

    Suppose there is a pair of newborn bunnies in the pasture in the first month, each pair of male and female bunnies grew into a large male and female rabbits after two months later. After three months from the start, each pair of male and female rabbit can give birth to a pair of small bunnies every month. If the rabbits can live forever, how many pairs of rabbits in the pasture in the first N month?

(1<=N<=90)(Very IMPORTANT)

Input

3

Output

2

 

Input

5

Output

5

 

Input

88

Output

1100087778366101931

[Exam] asked in Midterm
ID: 24269 - Available when: Unlimited - Due to: Unlimited
| 1.4k views

13 Answers

0 like 0 dislike
Hidden content!
** * * *** * *


**


n;
* * * * int *

int i;
* ** * int b;






* * ** ***** ******




*** * *** ****

if ** *
** * * ** *** * * * * ** **

}
* ** if **
*** ** **** * * ** *

}


* *
** * * * *



}
* * * *


** ** * *** * ***
*** 0;}
answered by (-34 points)
0 like 0 dislike
Hidden content!
*** * * *



int ***



int n;
* * long int **

int i;


****** *** * ** ***
* ***** ** ****

if
* *** ** * * * ** ****** * *

else if **
* ** * * * * * ** * *
*
* ** *



}




*** ** ** * **** *
* * 0;}
answered by (-34 points)
0 like 0 dislike
Hidden content!
** * ** ** ** *** * **



int ***



int n;
* long int * *

int i;


* ** * * * * * ****
** * * ** **

if *
** ** * ** * **** *

else if **
*** *** * * *** * ****
**
** ** * **



}




* ** * *** * ** * **** * * *
* *** 0;}
answered by (-34 points)
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:172.69.59.19
©2016-2025

Related questions

0 like 0 dislike
8 answers
[Exam] asked Apr 21, 2017 in Midterm
ID: 24273 - Available when: Unlimited - Due to: Unlimited
| 929 views
0 like 0 dislike
6 answers
[Normal] asked Apr 21, 2017 in Midterm by thopd (12.1k points)
ID: 24271 - Available when: Unlimited - Due to: Unlimited
| 800 views
0 like 0 dislike
44 answers
[Exam] asked Apr 13, 2017 in Midterm
ID: 23785 - Available when: Unlimited - Due to: Unlimited
| 3.4k views
0 like 0 dislike
4 answers
[Exam] asked Apr 21, 2017 in Midterm
ID: 24272 - Available when: Unlimited - Due to: Unlimited
| 654 views
0 like 0 dislike
11 answers
[Exam] asked Apr 21, 2017 in Midterm
ID: 24270 - Available when: Unlimited - Due to: Unlimited
| 1.3k views
12,783 questions
183,442 answers
172,219 comments
4,824 users