Product of consecutive Fib numbers
[F(n), F(n+1), true] or {F(n), F(n+1), 1} or (F(n), F(n+1), True)[F(m), F(m+1), false] or {F(n), F(n+1), 0} or (F(n), F(n+1), False)Some Examples of Return:
productFib(714) # should return (21, 34, true),
# since F(8) = 21, F(9) = 34 and 714 = 21 * 34
productFib(800) # should return (34, 55, false),
# since F(8) = 21, F(9) = 34, F(10) = 55 and 21 * 34 < 800 < 34 * 55
-----
productFib(714) # should return [21, 34, true],
productFib(800) # should return [34, 55, false],
-----
productFib(714) # should return {21, 34, 1},
productFib(800) # should return {34, 55, 0},
-----
productFib(714) # should return {21, 34, true},
productFib(800) # should return {34, 55, false},Note:
Solutions
π§ C++
Last updated