Random maths problem
Date: 09/20/05
(Algorithms) Keywords: no keywords
Just a random maths problem, because we were just discussing it at work. You might know this. Also you could argue it's not an algorithms problem, but I think it is because it's interesting how many people think they've run an exaustive algorithm in their head and miss the solution.
Use two 3s and two 8s and make 24. You can use +,-,* and divide. You have to use all the numbers
For example, If I said "use two 2s and two 3s to make 2", you could say "2/2 + 3/3 = 2".
Notes:
There are NO tricks. You can't stick numbers together (ie use 3 and 8 to make 38). No decimals (you can't write .3 and claim that is 0.3), no fancy complicated maths, no strange rounding. Just 4 numbers and normal maths symbols. Dispite the fact there shouldn't be many combinations, it's suprisingly hard :)
I wouldn't read the comments until you've had a go, because I suspect people will post the answer fairly quickly :)
EDIT: Just one extra thing I should have made clear. You can use brackets
Source: http://community.livejournal.com/algorithms/64828.html