Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
um, what? I do not understand what you are asking of me
Apparently the test cases are buggy so the problem might not be your solution.
This comment is hidden because it contains spoiler information about the solution
regardless of the order
...Please don't raise issues so lightly. This kata has been solved almost 90k times !
This comment is hidden because it contains spoiler information about the solution
No, and see the example in the kata's description, at the end of the third year, you have a population of 1213.
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