Share |

Friday, April 9, 2010

Two Numbers Guessing Game

As you might have noticed, the two numbers of which you are asked to select one, always have different parities: one is always even, the other is always odd. You are also asked to multiply one of them by an even number, the other by an odd number. It's always the case that one of the products is even. The other may be either even or odd. In the former case, the sum of two products is even, in the latter case it's odd. Checking the parity of the sum, I can immediately tell which number you selected.

No comments:

Post a Comment