Ad
  • Custom User Avatar
  • Custom User Avatar

    @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.

  • Custom User Avatar

    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.