You need to sign in or sign up before continuing.×
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.
Just wow
@Chrono79 I know there's no fractional population, but read again. Even if I rounded down 1214,22 to 1214, don't you agree that 1214 = 1214? And, in that test, 1214 is p. So if the idea was that p0 equals or surpasses p, 1214 (rounded down from 1214,22) would suffice.
Test case saying the result is supposed to return 4 years is, in fact, 3 years. The input is (1000, 2, 50, 1214). If you do the math "by hand", in the third year you would have 1214,222 people. Even if you round down to 1214, 1214 is still equal to 1214. So, there's a problem with the kata's writing. It should say that the expected years is greater than 1214(p) instead of greater OR equal to... That or the expected result for this test should be 3 instead of 4.