Ad
  • Custom User Avatar

    How it is not broken? The requirement is "How many years does the town need to see its population greater than or equal to p"
    if population rounded down is 1214 then it is equal to p which is 1214 right? And since the question is greater than OR EQUAL, then the test is broken.

  • Custom User Avatar

    The requirement is "How many years does the town need to see its population greater than or equal to p"
    if p0 rounded down is 1214 then it is equal to p which is 1214 right? And since the question is greater than OR EQUAL, then the test is broken.

  • Custom User Avatar

    The method returns an int, and Math.Ceiling returns a double, you'll need to convert them into int.

  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

    1: Please read the description:

    Per Wikipedia, a prime number (or a prime) is a natural number greater than 1 that has no positive divisors other than 1 and itself.

    1 is not greater than 1.

    2: It doesn't require so much optimization, 6 kyu is fine.

  • Custom User Avatar

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