I’ve seen this riddle a number of times over the years, and a week or so back, I came across it again. So, because I find it quite amusing, and because I know many developers will not know or guess the answer straight away, I decided to add the “riddle” or whatever you want to call it, to this blog.
3 people check in to a motel room that costs €30 for a single night. So they each pay €10 for the night. Later the receptionist discovers that the room that had been assigned, really only costs €25, a difference of €5 that needs to be returned to the 3 people. The receptionist asks the bellhop to return the €5, giving him 5 €1 coins. The bellhop gives the 5 coins to the 3 people, but since they can’t split them equally between themselves, they each take 1 coin and give 2 coins to the bellhop. So now, the room costs each €9 and the bellhop made €2.
Now the question is, how does 3*9 + 2 make 30?
Answer: Change the formula, so it reads 3*9 – 2, which makes 25. Simple, right?