Monday, 12 February 2018

DAY 454

TWENTY-FOUR

Credit: Jon Erickson
HACKING
The Art of Exploitation, 2nd Ed.

Use each of the numbers 1, 3, 4, and 6 once and only once with any of the four math operations to total 24. You may define the order of operations. For example, 3 x (4+6) + 1 = 31 is valid, but incorrect, since it doesn't total 24.
                                                       
[Note from JA: This problem is not nearly as simple as it might appear. You'll appreciate the solution more if you try it first - before looking at the hints or answer.]

HINTS:
1. There are no parentheses, exponents, or radicals in the answer.
2. The answer involves only two math operations.
3. The answer involves fractions.
4. The answer involves division of fractions.

Answer:

[Note from JA: I was able to figure out that the answer had to involve division of fractions. I also figured out that 6 divided by 1/4 would equal 24. But what about that pesky 3? This is where I gave up. Here is the solution:] 

      
   1 - 3/4

No comments:

Post a Comment