Ad
  • Custom User Avatar

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

  • Custom User Avatar

    Could you post your code so I can have a look and give you a hint?

  • Custom User Avatar

    1131522 what? Mangoes? And at what price per mango?
    If it's for python or javascript, I just checked the test cases and they're working fine.

  • Custom User Avatar

    Which language is that for? I've only write the Python one which doesn't have that issue

  • Custom User Avatar

    What bonus? We'r calculating the total cost of mangoes. The offer is that for every 3 mangoes you buy, you only pay the price of 2.
    Each mango cost £3 => if you buy 2 mangoes it will £6
    If you were to buy 3 mangoes at £3 each, the total price is still £6.
    4 mangoes at £3 each => total price = £9 and so on.
    Let me know if this makes sense

  • Custom User Avatar

    I just checked the test cases again and they're fine. You might want to check your code again.
    3rd test case: quantity is 2 and price is 3 => total price = 6
    4th test case: quanity is 7 and price is 3 => total price = 15

  • Custom User Avatar

    Didn't spot that, fixed it

  • Custom User Avatar

    I can't see any Ruby translations...

  • Custom User Avatar

    Just added the random testcases :)