You need to sign in or sign up before continuing.×
Ad
  • Custom User Avatar
  • Custom User Avatar

    There seems to be some issues regarding the expected values of the tests.

    It isn't possible for x=6 and y=18, as a and b would be complex

    Actually, the solution for the equation is $a=b=3$, so there is a real solution for $a^7+b^7$

    For x=5 and y=35, correct answer is 1576.6106018024825 with maximum deviation of 1e-06

    The solution for these equations are $a=\frac {5 + 3 \sqrt 5} {2}$ and $b=\frac {5 - 3 \sqrt 5} {2}$, or vice versa, and $a^7+b^7=235625$, not $1576.6..$

  • Custom User Avatar

    The description still does not say it expects an array of AP numbers, even though the example assumes you do, but without context it makes no sense why 15(7+8) is part of the answer for start=7 but 27(10+17) is not.

    11, 13, 17, 19, 23, 29 are natural numbers so they can't be divided any way.

    Every integer >0 is a natural number. Did you mean something like regular prime numbers?

  • Custom User Avatar

    The result is the set of numbers that can be decomposed from the sum of two prime numbers, considering the provider number (start param) and the next one (start+1) as primes, and all numbers smaller than the provided one are not.

    The result is the set of prime (in the problem definition) numbers that can be decomposed from the sum of two distinct prime numbers. These should be in the problem description.(not true for start 0 or 1, but is the answer for every number greater than that)

    All test inputs are going to be > 0.

    There are cases where the random tests test for start = 0

    This should have a performance tag.

    I have no idea how could this problem work for start 0 or 1, maybe put one of them in the sample tests?

  • Custom User Avatar
  • 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

    A slip on my part. It's all long long now.

  • Custom User Avatar

    Since this kata is tagged as performance, you could make your tests more demanding. I fail to see a solution so poor optimized as to fail these tests by timeout the way they currently are.

  • Custom User Avatar

    p_feild seems to be a typo, though I can't be sure considering how consistent it is.

    Even if it is, though, you shouldn't invoke the function using keyword arguments in your tests unless you have a good reason to do so, since now you make it unable to change the name of the parameter of the function. Prefer to use ordered arguments instead, i.e use magic_plant(1, 2, 3) instead of magic_plant(p_feild=1, split=2, n=3)

    Also, afaik it's not required to assign a rank to a beta kata.

  • Custom User Avatar
  • Custom User Avatar
  • Custom User Avatar
  • Custom User Avatar

    The kata should either be explicit about the values of the input being sorted or test for inputs that are not.

  • Custom User Avatar

    This is a problem I found in Python but it may be a problem in basically all of the implementations, considering this seems to have been an issue regardless of language

    Python's countdown function, the one used to validate the code of the user, has an error in its implementation when dealing with datetimes of 30 seconds.
    For example, it returns the value answer 704 minutes for both 12:15:30 and 12:16:30. This happens because python's built-in implementation of round evaluate for the closest pair when dealing with .5 in 0 decimals precision. From the documentation:

    if two multiples are equally close, rounding is done toward the even choice (so, for example, both round(0.5) and round(-0.5) are 0, and round(1.5) is 2).

    Source

  • Loading more items...