Find nine single digit numbers (other than 1, 2, 3, ..., and 9) with a sum of 45 and a product of 9! (362,880).
For instance, 2, 2, 3, 4, 5, 6, 7, 8, 8 add up to 45, but their product is 645,120.
Try finding the answer without the use of a program.
I found one possible answer being
1,2,4,4,4,5,7,9,9
I broke down each number 1 through 9 to its lowest common multiple, thus giving me: 1,2,3,2x2,5,2x3,7,2x2x2,3x3. All together being 2x2x2x2x2x2x2x3x3x3x3x5x7. This way I know that the product will remain correct.
Trial and error got me to the above solution after about 5 different variations.
I just went back and read Charlie's post and he had attacked it the same way as I did.
|
Posted by steve
on 2005-02-28 21:09:28 |