Jack has 40 dollars more than Jill. Jack gives 20 dollars to Jill. Then they have the same amount of money. I found the answer by method of exhaustion, but how can this be solved more elegantly?
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
There are multiple solutions to this problem because the second constraint is the same as the first.
Call Jack's starting amount $k$ (after the last letter of his name), and Jill's $l$. Then we know from the first part of the question that $k-l=40$.
The second part says if $k$ is lowered by 20 and $l$ is raised by 20, they are equal. So $k-20 = l+20$. With basic algebra, this translates to $k-l=40$, so we get the same requirement as the first condition.
This means that any starting amount for Jack will work, provided it is 40 or higher. Then set Jill's amount as 40 less, and the second constraint will also work.