Ad
  • Custom User Avatar
  • Custom User Avatar

    There is no problem with the tests, the error message is only showing the first failed test, look at the sample tests, the first one expects 3, the second 1, that's why you get that.

  • Custom User Avatar

    My solution was, instead of trying to reverse calculate from m, I just iterated the volumes of m for n=1 up until the test volume was equal or exceeding m. Loop until the test volume is not less, then outside the loop test if the volume encountered was equal vs greater. If equal, return n, else return -1. It works for all but 2 cases, which makes no sense to me, because if I manually reconstruct test1 and testA, my manual calculation comes out with a different answer than the assertion.

  • Custom User Avatar

    @Mo_Tab , Thanks for your Kind Words :relaxed:

    a formula for all prime numbers

    • Actually, there is, with some exceptions, but it' not handy in this Kata since it targets pretty narrow range While the Formula, of course, covers a more wide-scale :wink:...
  • Custom User Avatar

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

  • Custom User Avatar

    specify your language, post your code with a spoiler tag, and use proper markdown formatting, otherwise probably no-one will have any idea how to help you

  • Custom User Avatar

    for(double i=0; i<n; i++) {

  • Custom User Avatar

    Complete the solution so that it returns true if the first argument(string) passed in ends with the 2nd argument (also a string).

    False is ok for those strings.

  • Custom User Avatar

    Your code is wrong, check the instructions again, why are you adding up the values? Not a kata issue.

  • Custom User Avatar

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