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.
done!
There seems to be some issues regarding the expected values of the tests.
Actually, the solution for the equation is
$a=b=3$
, so there is a real solution for$a^7+b^7$
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..$
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 forstart=7
but27(10+17)
is not.Every integer >0 is a natural number. Did you mean something like regular prime numbers?
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 forstart
0 or 1, but is the answer for every number greater than that)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?
C Translation
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
A slip on my part. It's all
long long
now.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.
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 ofmagic_plant(p_feild=1, split=2, n=3)
Also, afaik it's not required to assign a rank to a beta kata.
C Translation
Java Translation
Done in a fork. Link
The kata should either be explicit about the values of the input being sorted or test for inputs that are not.
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 both12:15:30
and12:16:30
. This happens because python's built-in implementation ofround
evaluate for the closest pair when dealing with.5
in 0 decimals precision. From the documentation:Source
Loading more items...