A master lock has a three-digit code. The sum of the first and second digits is 8. The sum of the second and third digits is 14. The sum of all three digits is 17. What is the code?
3, 5, 9
Let the digits be A, B, and C. We know A + B + C = 17. Since A + B = 8, substituting this into the total gives 8 + C = 17, so C = 9. Since B + C = 14, substituting C = 9 gives B + 9 = 14, so B = 5. Since A + B = 8, substituting B = 5 gives A + 5 = 8, so A = 3. The code is 359.
About this riddle
Logic riddles give you a few facts and ask what must be true. List what you know, cross out what cannot be, and see what is left.
Difficulty: Medium. More like this: Logic riddles with answers or try Einstein's Logic Grid for a different kind of puzzle.
More logic riddles
A man is looking at a photograph of someone on the wall. His friend asks, 'Whose picture are you looking at?' The man replies: 'Brothers and sisters have I none, but that man's father is my father's son.' Who is in the photograph?
The rainbow is smaller than the clover, and the clover is smaller than the leprechaun. Which one is the biggest?
A farmer needs to cross a river with a wolf, a goat, and a cabbage. His boat can only carry himself and one item at a time. However, if left unattended, the wolf will eat the goat, and the goat will eat the cabbage. What is the minimum number of one-way trips the farmer must make to get everything across safely?
Four runners—W, X, Y, and Z—finished a race. W finished before X. Y finished after Z. X finished before Z. What was the exact finishing order from first to last?
A palindrome is a word that reads the same forwards and backwards. If you take a 5-letter English palindrome, remove its first and last letters, and the remaining 3-letter string is also a valid English word, what must the original word be?
In a small youth club, every child plays soccer, basketball, or both. Exactly 6 children play soccer, 5 play basketball, and 2 play both sports. How many children are in the club in total?

