Ad
  • Custom User Avatar

    When reporting issues, or asking for help, you should specify the language you are using. Each language has its own test setup.

  • Custom User Avatar

    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.

  • Custom User Avatar

    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. Here 55 * 89 = 4895 (< 5895), so it's not ok.

    Your error comes from supposing that if fib(n) <= sqrt(x) and fib(n + 1) >= sqrt(x) then fib(n) * fib(n + 1) >= x. That's wrong. forget fibonacci for a moment: 9 < sqrt(100), 11 > sqrt(100), but obviously 9 * 11 < 100.

  • Custom User Avatar

    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).