[文档]JAVA经典算法40例.doc
JAVA经典算法40例【程序1】题目:古典问题:有一对兔子,从出生后第3个月起每个月都生一对兔子。小兔子长到第四个月后每个月又生一对兔子,假如兔子都不死,问每个月的兔子总数为多少?
1.程序分析:兔子的规律为数列1,1,2,3,5,8,13,21. . . .
(40 classic java algorithms
title: classical question: there is a pair of rabbits. From the third month after birth, a pair of rabbits are born every month. After the little rabbit grows to the fourth month, a pair of rabbits are born every month. If the rabbits do not die, how many rabbits are there in each month?
1. program analysis: the rule of rabbits is the sequence 1,1,2,3,5,8,13,21)
页:
[1]