题解 | #统计每个月兔子的总数#
统计每个月兔子的总数
https://www.nowcoder.com/practice/1221ec77125d4370833fd3ad5ba72395
package main
import (
"fmt"
)
func main() {
month := 0
fmt.Scan(&month)
father, child := 1, 0
for ; month > 1; month-- {
father, child = father+child, father
}
fmt.Println(father)
}
