Ad
  • Default User Avatar

    um, what? I do not understand what you are asking of me

  • Custom User Avatar

    Apparently the test cases are buggy so the problem might not be your solution.

  • Custom User Avatar

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

  • Custom User Avatar

    regardless of the order...

    Please don't raise issues so lightly. This kata has been solved almost 90k times !

  • Custom User Avatar

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

  • Custom User Avatar

    No, and see the example in the kata's description, at the end of the third year, you have a population of 1213.

  • Custom User Avatar

    In the case for p0 = 1000, percent = 2.0, aug = 50 and p = 1214, the correct return would be 3 and not 4 as expected in the tests. I performed the table test and in the third year the approximate number of 1214 is obtained. As the challenge wants the number of years needed to obtain a population greater than or EQUAL to p, then in the third year this is already obtained.

    p0 percent aug p inhabitants years inhabitants < p
    1000 2.0 50 1214 1070 1 TRUE
    1070 2.0 50 1214 1141 2 TRUE
    1141 2.0 50 1214 1214 3 FALSE -> Break