Ad
  • Custom User Avatar
  • Custom User Avatar

    This is really an issue

  • Custom User Avatar

    the probability that during the passage of one stop the controllers will check his ticket is 1%

    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.

  • Custom User Avatar

    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.

  • Custom User Avatar

    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.

  • Custom User Avatar

    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.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Thanks, increased chance to "steal a ride" in other way.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    OK, it's my first kata. I'm testing, how adding proccess work. I will try to create more high-quality and complex tasks.

  • Custom User Avatar

    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