Ad
  • Custom User Avatar

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

  • Custom User Avatar

    As you can see in my post above, I am taking in to considerantion that you can't have 0.whatever population by applying Math.round to my result (I am trying with Math.ceil as well and is not working). Is still not working for me, and, I am taking into consideration that the result should be >= to p. Can somebody help? or point me in the right direction without just giving me a dislike :|

  • Custom User Avatar

    I don't think this will ever get resolved. Some people can't handle fractional people, others can't deal with continious functions. It's the battle of the ages.

  • Custom User Avatar

    @heblopez The error is right there, in the year 1...3 in the output of your solution. Population is the count of a species living in a certain area (in the context of the kata, the species is human). As stated by RileyHunter, you can't count a person partially. For example, let's look at the output of your solution. 1141.4, there are 1141 and 0.4 people in a certain area. What does the 0.4 indicates? You can't just have a person counted as 0.4.

  • Custom User Avatar

    Read the post of RileyHunter again, you can't have fractional people.

  • Custom User Avatar

    For the first test case, your solution suggests that after year two there are 1858.75 people in the population - but can you really have three quarters of a person? Think about what data types you're using here and read the description carefully.