Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
When reporting issues, or asking for help, you should specify the language you are using. Each language has its own test setup.
All you can tell by stopping where you do is if the third element is false or true, but it doesn't always give you the first two elements when it's false (just look at the example you're giving, it's clear the answer is not good)... Well, you're not so far from the solution... I'm sure you'll end up getting it. I mark the rest of the discussion with a spoiler flag since it gives too many hints.
Ok, you mean your solution doesn't pass the tests (sorry I didn't understand). Read carefully the description: You must find
F(n) * F(n+1) >= prod
. Here55 * 89 = 4895 (< 5895)
, so it's not ok.Your error comes from supposing that if
fib(n) <= sqrt(x)
andfib(n + 1) >= sqrt(x)
thenfib(n) * fib(n + 1) >= x
. That's wrong. forget fibonacci for a moment:9 < sqrt(100)
,11 > sqrt(100)
, but obviously9 * 11 < 100
.What's the purpose of your comment? Please mark it with a spoiler flag when you give possible hints to a kata (I mark if for you this time).