Ad
  • Custom User Avatar

    Hint is indeed not a kata suggestion, and don't give hints, all is in the description, the rest is up to the user, thinking, doing researches and not reading discussion page.

  • Custom User Avatar

    When I showed this code to my colleage he said it is Lisp. I did some digging on that website and found fragment suggesting this is Scheme variant of Lisp. I even found online compiler for this, but was unable to run any copy-pasted code there without errors.

    But I don't think you need to be familiar with that language to understand their examples. The most important information my colleague gave me is that in Lisp operator precedes arguments, so for example * a b would be a * b in C.

  • Custom User Avatar

    If you don't find two consecutive F(m) verifying F(m) * F(m+1) = prod you will return

    F(m), F(m+1), false] or {F(n), F(n+1), 0} or (F(n), F(n+1), False)

    F(m) being the smallest one such as F(m) * F(m+1) > prod.

    Read the text in bold too. It's not what you think you should return, it's returning what you're asked to do.

    For productFib(5895) 55 * 89 = 4895 and 4895 < 5895, so yes, your numbers are wrong.

  • Custom User Avatar

    Not a kata issue, your code returns the wrong numbers.