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 is really an issue
It is not clarified how "being caught" works, and the reference solution assumes that each station is independent of each other, which is not how typically these problems are posed.
The reference solution assumes that when getting caught, we don't actually get the ticket whose price we had to paid for (in addition to the penalty). This means we can keep getting caught over and over again.
Personally I find this assumption quite unintuitive. In principle it's OK for me, but I'd prefer to see it stated clearly, rather than having to guess whether the description is omitting details.
I see. Okay, the part I missed is in the case where Vanya gets caught and pays the penalty, he'll still have to pay for the ticket.
If you ask about test "given (2, 198, 1)", total pay will 198+2 = 200. 1% of this is identical to cost of ticket 2=2.
This comment is hidden because it contains spoiler information about the solution
Thanks, increased chance to "steal a ride" in other way.
This comment is hidden because it contains spoiler information about the solution
OK, it's my first kata. I'm testing, how adding proccess work. I will try to create more high-quality and complex tasks.
Not a bad kata,
but it has little chance of approval,
since there are many similar kata to codewars.
Well, random tests are implemented at a good level,
but you can do better, read the docs