A customer at a 7-11 store selected four items to buy, and was told that the cost was $7.11. He was curious that the cost was the same as the store name, so he enquired as to how the figure was derived. The clerk said that he had simply multiplied the prices of the four individual items. The customer protested that the four prices should have been ADDED, not MULTIPLIED. The clerk said that that was OK with him, but, the result was still the same: exactly $7.11. What were the four prices? (Do NOT count sales tax.)
let's use cents instead of dollars, so that the four numbers result in 711 when added and 711000000 when multiplied.
the prime factors of the latter are:
2*2*2*2*2*2 * 3*3 * 5*5*5*5*5*5 * 79 = 711
the least significant digit of the four numbers are ...1 when added and ...0 when multiplied. The only combinations for which this works are (at least i think they are the only ones):
0 0 0 1 and 0 0 5 6
The only number ending in 1 that can be build from the prime factors is 711 (3*3*79), which is obviously too big.
The only numbers ending in 6 are 6 (2*3) and 316 (2*2*79).
6 isn't possible as well, because the sum of the remaining 3 numbers will always be bigger than 765.
Therefore 316 is one of the four numbers need to be 316.
The remaining prime factors are now:
2*2*2*2 * 3*3 * 5*5*5*5*5*5
We know that one of the remaining numbers needs to end with a 5, the possible numbers are:
15 (5*3), 25 (5*5), 75 (5*5*3) which are all too small (the sum would exceed 711)
125 (5*5*5), 225 (5*5*3*3) both seem to be possible on first glance
375 (5*5*5*3) and bigger ones which are obviously too big.
Let's assume we would pick 225, now the sum of the two missing numbers needs to be 711-316-225 = 170, while the product needs to be 711000000/316/225 = 10000.
The biggest product you can get from two numbers whose sum is 170 is (170/2)^2 = 7225 which is smaller than 10000, so 225 is out as well.
This means that we have 125 and 316 as the first two solutions, so the sum of the last two numbers needs to be 270. The product needs to be 18000.
This is pretty simple math:
x * (270 - x) = 18000
270x - x^2 = 18000
x^2 - 270x + 18000 = 0
x(1, 2) = 270/2 +- sqrt((270/2)^2 - 18000)
x1 = 150, x2 = 120
so the solution is (as others have found before):
120, 125, 150, 316