-->
当前位置:首页 > 题库

PROGRAMMING:Rabbit reproduction

Luz5年前 (2021-05-10)题库433
A pair of rabbits, from the third month after birth, have a pair of rabbits every month. The rabbits grow to the third month, and then give birth to a pair of rabbits every month. If the rabbits do not die, a pair of rabbits born in the first month at least need to reproduce to a few months before the total number of rabbits can reach $$n $$right?
###Input format:
Enter to give a positive integer of no more than 10000 $$n $$in one line.
###Output format:
The minimum number of months needed to output the total number of rabbits in a row to reach $$n $.
###Input example:
```in
thirty
```
###Output example:
```out
nine
```






answer:If there is no answer, please comment