A farmer buys 100 animals for exactly 100 silver coins. Buffaloes cost 10 coins each, pigs cost 3 coins each, and chickens cost 0.5 coins each. Buy at least one of each type. How many animals of each type did you buy?
Classical "Master Sun" problem, 3rd-5th century, China
Home > Riddles > The Chinese Farmer's Riddle
The Chinese Farmer's Riddle
Hints
Show hints
- System of equations: b + c + p = 100 (animals).
- Clearing: $c=\frac{100-19b}{5}=20-\frac{19b}{5}$.
- 5 buffaloes, 1 pig, 94 chickens.
Solution
Show full solution
Answer: 5 buffaloes, 1 pig, 94 chickens.
System of equations:
- $b$ = buffaloes, $c$ = pigs, $p$ = chickens
- $b + c + p = 100$ (animals)
- $10b + 3c + 0.5p = 100$ (coins)
- $b, c, p \geq 1$
Resolution:
From the second equation: $20b + 6c + p = 200$
Subtracting the first one from this: $19b + 5c = 100$
Solving: $c = \frac{100 - 19b}{5} = 20 - \frac{19b}{5}$
For $c$ to be an integer, $19b$ must be divisible by 5. Like $\gcd(19,5) = 1$, then $b$ must be a multiple of 5.
Testing values:
- $b = 5$: $c = 20 - 19 = 1$, $p = 100 - 5 - 1 = 94$ $\checkmark$
- $b = 10$: $c = 20 - 38 = -18$ $\times$
Single solution: 5 buffaloes, 1 pig, 94 chickens.
Related riddles
Keep practicing
If you enjoyed this one, try more pure-logic riddles, explore this theme, browse the full archive, or read the riddle-solving guide.