Ad
  • Default User Avatar

    Thank you sensei, i fixed it.

  • Default User Avatar

    Indentation is off because you confound quotes an backquotes (or backticks). You could have googled that:-)

    I tried your solution which gives false results:

    For n = 841 your solution returns: (2)(29**2) which is clearly false since 841 is not even.
    For n = 479803 you return (2)(23**2)(907) which is false for the same reason. It seems that this solution of yours has too many 2 as factors...

    PS: I lost lots of time but, nevertheless, cheers!

  • Default User Avatar

    I just saw this post of yours. The input is 841. Your code returns (2)(29**2) which is false since the correct result is (29**2); (29 * 29 is 841).

  • Default User Avatar

    Please take a look, the indentation was off, not sure why.

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    I just tried. For input 1348934 my reference solution returns the correct result (2)(31)(21757). 14 guys passed the Go kata so if there were errors somebody would have seen them. You can post your code if you want between 3 backticks at the beginning and three others at the end, correctly indented and marked as spoiler.

  • Default User Avatar

    It is Golang my code produced 1348934 = (2)(31)(21757) from a random test. it cant be (31)(21757). Thanks. I think it is issue currently. Please help

  • Default User Avatar

    Please which language? Which input?

  • Default User Avatar

    Expected
    : (2)(31)(21757)
    to equal
    : (31)(21757)

    (2)(31)(21757) is the right answer

  • Default User Avatar

    how did you optimize it?

  • Default User Avatar

    The random test methods are not working.
    Expected
    : (2)(292)
    to equal
    : (29
    2)
    The correct one is (2)(29**2).