Ad
  • Default User Avatar
  • Custom User Avatar
  • Custom User Avatar

    Not rational and likely to cause headaches.

    It takes into account for total cost, the fuel you consume travelling to and from said station; This is why the original examples price is 48.75, it is the price 1.5 * the total in litres 32.5. You will be filling the original 60 - 35 = 25 litres, plus the trip to and from which are each 3.75 litres. Based on Fuel Consumption 7.5/100 * distance.

    But, it doesn't take into account total fuel you will have upon returning to your home.
    So, my original solution checked to make sure that if you LEAVE to get fuel you will return home with MORE fuel than when you left.
    Some test cases had me returning home with less fuel, why would i leave home and waste money to have less fuel.

    I understand it is for fun, but more concise explanation or description would help understand the goal of the function.
    So, it is not a practical or realistic test and should reflect better parameters in the description.

  • Custom User Avatar

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

  • Default User Avatar
  • Custom User Avatar

    Description should use Markdown instead of HTML.

  • Custom User Avatar

    Description should be language-agnostic

  • Default User Avatar
  • Custom User Avatar

    This is a problem I found in Python but it may be a problem in basically all of the implementations, considering this seems to have been an issue regardless of language

    Python's countdown function, the one used to validate the code of the user, has an error in its implementation when dealing with datetimes of 30 seconds.
    For example, it returns the value answer 704 minutes for both 12:15:30 and 12:16:30. This happens because python's built-in implementation of round evaluate for the closest pair when dealing with .5 in 0 decimals precision. From the documentation:

    if two multiples are equally close, rounding is done toward the even choice (so, for example, both round(0.5) and round(-0.5) are 0, and round(1.5) is 2).

    Source

  • Default User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

    I don't understand how to round up the minutes. This command does not work:

    LocalTime time = LocalTime.of(d.getHours(), (d.getSeconds() < 30) ? d.getMinutes() : d.getMinutes() + 1);
    

    Please tell me how to round up the minutes?

  • Default User Avatar

    and characters which should not be included in x

    What does it mean? What's x?

  • Default User Avatar

    JS: Node v14 should be used along with its appropiate assertion tools (Mocha + Chai).
    Refer to this and this

  • Custom User Avatar

    Python random tests are badly designed and systematically give 0 or 1 for at least the 4 first tests.

  • Loading more items...