20-CS-110-001 Introduction to Computer Science Fall 2010

Morning Pills Puzzle

    You have two types of pills, A & B. You need to take one of each pill in the morning, and you can't take extras because it will make you sick. One morning you open the A pills up and drop one in your hand. Then you open up the B pills and by mistake drop two in your hand. The problem is the pills look exactly the same and they got mixed up in your hand. The question is, how do you make sure that you take one A pill and one B pill without wasting any pills?
       
    solution