Ad
  • Custom User Avatar

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

  • Custom User Avatar

    I have to unlock this solution because of the timed out although I tried to simplify my code.

  • Custom User Avatar

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

  • Custom User Avatar

    Are you sure you get invalid answers with this code on CW? I ran it several times and all I got were timeouts, and not a single wrong answer.

    Also you could work on your factoriazation method a bit. It first goes through the number too many times, and then unneccessarily scans the collection of factors many times. These operations can be reduced significantly to, more or less, one loop over the part of the number, and eventually one loop over the collected factors.

  • Custom User Avatar

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

  • Custom User Avatar

    Then you have to show us your code, I think it will be the easiest way to find your mistake. Remember about formatting and spoiler flag.

  • Custom User Avatar

    yeah, it's working fine in a row ( on my IDE)

  • Custom User Avatar

    You should check if your solution works good when run twice in a row, for two or more test cases run one after another.

  • Custom User Avatar

    Hi, what's wrong with the attempt test? "expected:<[(7919)]> but was:<[]>". For basic test it's working fine, on my local IDE too. What should i do? it's really nice kata, i want to get it done :)

  • Custom User Avatar

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

  • Custom User Avatar

    Solved it bro it took me some time to realize where I was going wrong but did it.

  • Custom User Avatar

    A problem with your code isn't a kata issue. It works fine in Python with more than 28k completions. You must be doing something wrong. Post your code using markdown formatting so we can see it.

  • Custom User Avatar

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

  • Custom User Avatar

    "error: method whoLikesIt in class Solution cannot be applied to given types;
    assertEquals("no one likes this", Solution.whoLikesIt());"
    in my IDEA Intelij it's working correctly when testing. What's wrong?