Test if a number is fibonacci

后端 未结 20 906
深忆病人
深忆病人 2020-11-30 17:58

I know how to make the list of the Fibonacci numbers, but i don\'t know how can i test if a given number belongs to the fibonacci list - one way that comes in mind is genera

20条回答
  •  眼角桃花
    2020-11-30 18:35

    See the section "Recognizing Fibonacci numbers" on the wikipedia article about the Fibonacci numbers.

提交回复
热议问题