Problem #2

Last updated on April 29, 2005.


Question: A fruitstand in my neighborhood sells apples for 29 cents apiece, and oranges for 39 cents apiece. One day I went there and filled a basket with a mixture of apples and oranges. When I paid for them I handed the clerk a $20 bill, and she handed me back my change ... one penny. How many apples did I buy? (Assume there was no sales tax charged.)

Answer:

$1.00 = 100¢

29A + 39O = 1999

29A = 1999 ⇒ 0 ≤ A ≤ 68

39O = 1999 ⇒ 0 ≤ O ≤ 51

29A + 39O ≡ 9A + 9O ≡ 9(A + O) ≡ 9 (mod 10)

Note: Mod 10 means the remainder when the number is divided by 10. Two numbers are equal mod 10 if after you divide them by 10, their remainders are equal. Or when you subtract them, their difference is a multiple of 10. 15 and 5 are equal mod 10 since 15 - 5 is a multiple of 10.

∴ A + O ≡ 1 (mod 10)

Since 29 and 39 do not divide 1999, 29(A + O) < 29A + 39O < 39(A + O) ⇒ 51 < A + O < 68.

∴ A + O = 61.

11A=61 1161=A 1161=A 1161=A 1038=A
2939O1999 29391999O 010230O 0123O 0123O

Thus, A = 38 and O = 23 is the unique solution.