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.
Glad you enjoyed. I'll be interested to see how people solve it. Can you paste the exact error your are getting from the quick check? In the example mentioned above the ring size would be 1 because no one is spying on each other.
Thanks for taking a look at this one. I have updated the test cases so that - I beleive- you will receive a counter examples in case of failure. The random test case code snippet is:
This is my first Kata and I am not an expert on hTest, so I'd welcome improvement suggestions.
As for me - but I could be wrong - I think there is some confusion between
percent
andpercentage
; percent is the numerator of a fraction the denominator of which is 100 but it is only the numerator.2
percent is2
which means for the calculation in the body of a function a percentage of2/100 = 0.02
.It's more typical for a percent-type argument to already be divided by 100.
I am astonished that you don't know that
2 percent
is0.02
:-)Yea this stumped me for a while too...they way the 'percent' value is communicated in the description and examples is a bit unclear. The test case gives a clue as to what is meant by the value '5', but if you didn't have access to that info you wouldn't know what was going on
I was also confused by the 2 / 0.02 used in the example.
Perhaps it would be better to show it explicitly as 2/100
The description uses
2 percent
and the example-calculation uses0.02
because the parameterpercent
is ... * per cent* so 2 percent is 2/100 = 0.02. 5.0 percent in the first test case must be transformed by you in your program (and you did it!) inpercent / 100
to make the calculation. I really don't understand where you see a problem:-(