Three secret numbers, two questions
I am thinking of three positive whole numbers x, y and z. You may, twice, choose three whole numbers a, b, c (any size, positive or negative), and I will tell you the value of ax + by + cz.
Choose the two questions so that you can always determine x, y and z. Explain why the second question depends on the answer to the first.
Show a hint
Two equations cannot normally pin down three unknowns, but these unknowns are positive whole numbers, so they can be packed as digits of a single number if the base is large enough. Use the first question to learn how large a base you need.
Your answer
Solving needs a free account
Answers, streaks and solutions unlock when you are signed in. Reading the question and the hint stays free.
Discussion
💡 Discussion rules
- No full solutions here. Hints and approaches only.
- Complexity, edge cases and intuition are the point.
- Interview experiences are welcome. Respect your NDAs.
Loading discussion…
Learn the concepts
The theory behind this question.