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.
This comment is hidden because it contains spoiler information about the solution
i like it! my way but shoter)
There are tests with
x == 0
orr > x
.This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
how does the last one works (s6)? i can clearly see it working on a simpler example, but i don't get why it returns the corresponding integer
In your example, the lowest possible value shouldn't be 10 ?
It seems to me that if z is always the lowest possible value, z must be equal to r ?
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Turning @jungerstein's comment into an issue:
Please add to the description that either z > x or z >= x.
Although in the description, the 'lowest possible value' for z s.t. z % 13 == 10 is 25 (so that the answer will be 7), it is not the case.
The lowest possible value do not exist if you just restrict z, x, y being integers. The integer z could be negative, and as small as possible [if the definition of the remainder r being a = bq + r where 0 <= r < abs(q) is applied; I know sometimes the operator % behaves differently when negative integers are involved] -- so do not forget to add positive in the kata description.
Even z is restricted to be positive, its 'lowest value' is still not 25 in the example. It has to be 10, because 10 % 13 == 10 and any number in 1..9 does not rest 10 if divided by 13. So please do not forget to restrict again z > x.
Same here!!
Loading more items...