I wanted to buy a toy. I had four identical coins but these were not enough to pay for what I wanted, so I gave the shopkeeper a $10 note. He gave me a single coin for my change. If I had had that coin before I could have paid the exact amount.
What were the coins I had before I bought the toy?
Solution:
The most my change (one coin) could have been is $2, so my original four coins could have been worth $8 at the most.
Suppose that the shopkeeper gave me a 10c coin for my change. Then the toy would have had to have been worth $9.90. But $8 + 10c isn’t equal to that much, so I wouldn't have been able to afford the toy if I had that coin.
The same argument is true for 20c and 50c.
Suppose that the shopkeeper had given me $1 change. Then the toy would have been worth $9 and $8 + $1 is $9, so I could have had four $2 coins.
The only other possibility is that he gave me $2 change, in which case the toy was worth $8. But then either I had four $2 coins and could have afforded it already, or my coins were not $2 coins, in which case the $2 change would not give me enough to afford the toy.
The shopkeeper had to have given me $1 and my coins were four $2 coins.
Extension:
Would the answer change if I told you that I had four coins of any denomination (not necessarily all the same)?