There was a problem in the codechef practice section which was about a machine that gave you the reverse amount of any money amount less than or equal to how much you have currently. We had to find out the maximum money that we can get from the machine.
Does anybody remember solving this problem on CodeChef? If yes, please provide the problem link. Thanks.