Ad
  • Custom User Avatar

    Apologies for the late fix, the test cases should now be working properly :D

  • Custom User Avatar

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

  • Custom User Avatar

    this table should be in the description :)

  • Custom User Avatar

    Ok, here are some clues: Try to understand exactly how loops in JavaScript work and what could cause the error. Try to analyze all involved JavaScript objects. Experiment with your own loops and try to produce a similar bug. Use the test output cleverly to debug the program.

  • Custom User Avatar

    That "last 25" does not exist. How does a single 100 give you a 25? See table below:

    Vasya's deposit before Customer bill Vasya's deposit after
    0x25, 0x50, 0x100 25 1x25, 0x50, 0x100
    1x25, 0x50, 0x100 25 2x25, 0x50, 0x100
    2x25, 0x50, 0x100 25 3x25, 0x50, 0x100
    3x25, 0x50, 0x100 25 4x25, 0x50, 0x100
    4x25, 0x50, 0x100 25 5x25, 0x50, 0x100
    5x25, 0x50, 0x100 100 2x25, 0x50, 1x100
    2x25, 0x50, 1x100 100 "I'm sorry sir, I'm missing your change"