20 Questions (solution)
by Kai Huang, Alex Pearson, and Jonathan Sergent
The app asks you to guess a series of 3 or 4 digit numbers, using data gathered from specific questions you’re allowed to ask. The questions always appear in pairs. It turns out that the pairs are always adjacent items from an ordered list of 20 questions. The complete list of questions is as follows.
- If your secret number is written in base 3, what’s the sum of its digits (give the answer in base 10)?
- Sort the digits of your secret number in nonincreasing numerical order to create a new number, subtract your secret number from the new number, and divide the result by 9. What’s the remainder?
- What’s the sum of the first and last digits of your secret number?
- What’s the largest Fibonacci number that can be found as a prefix substring of your secret number? (If there is none, answer “None”.)
- How many dots are used in the Morse code representation of your secret number?
- How many segments are lit in the standard seven-segment display of your secret number?
- If your secret number is written in hexadecimal, what’s its first digit?
- If your were to count from 1 up to your secret number at the rate of one number per second, how many hours would you spend (take the ceiling to get an integer number of hours)?
- What’s the remainder when your secret number is divided by its leftmost digit?
- What’s the largest odd prime divisor of your secret number that’s also a palindrome? (If there is none, answer “None”.)
- What’s the sum of all the repeated digits in your secret number? (Repeated digits don’t need to be adjacent. Add all instances of each repeated digit. If no digit is repeated, answer “Not applicable”.)
- What’s the highest MIT Course number that is a substring of your secret number?
- How many letters are in the Roman numeral representation of your secret number? (Use the modern rules for writing Roman numerals, with the modification that M can be repeated as many times as necessary.)
- How many distinct permutations are there of the digits of your secret number? (The permutation may begin with 0.)
- Assume that digits 4 and 5 each take 2 strokes to write, while the rest of the digits each take 1 stroke to write. How many strokes does it take to write your secret number?
- Put a decimal point before the last two digits of your secret number. What’s the minimum number of pieces of US currency featuring past US presidents required to make this number of dollars and cents? (You’re allowed to use two-dollar bills and half-dollar coins if necessary.)
- What’s the Chinese zodiac animal of the year represented by your secret number?
- How many syllables does it take to say your secret number (in the standard way to write the number in English)?
- Take the number represented by the last two digits of your secret number. What’s the Scrabble score of this number spelled out in English? (Use “zero” if the last two digits are 00.)
- What’s the floor of the base-100 logarithm of your secret number?
The answers to the questions can be used to deduce the secret numbers. For each secret number, some questions are omitted and can never appear as choices for asking. The omitted questions are ((x - 1) % 20) + 1, (x % 20) + 1, and ((x + 1) % 20) + 1, where x is the one- or two-digit number formed from the thousands and hundreds digit of the secret number (i.e. the floor of the secret number divided by 100). It’s not necessary to notice this pattern for solving the puzzle, but it might be helpful in guessing the numbers if you happen to notice it.
There are a total of 99 secret numbers in the app, but you only need to get through the first 28 numbers (or even fewer) in order to solve this puzzle. This is because the 99 secret numbers encode 4 secret messages, but only the first secret message consisting of the first 28 numbers is a direct clue needed for deriving the final answer.
Below are the first 28 secret numbers, in order, with their respective answers for all 20 questions. For simplicity, we list all the answers, regardless of whether the question ever appears as a choice for the particular secret number.
Secret number | Q1 | Q2 | Q3 | Q4 | Q5 | Q6 | Q7 | Q8 | Q9 | Q10 | Q11 | Q12 | Q13 | Q14 | Q15 | Q16 | Q17 | Q18 | Q19 | Q20 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1701 | 3 | 0 | 2 | 1 | 5 | 13 | 6 | 1 | 0 | 7 | 2 | 17 | 5 | 12 | 4 | 5 | Snake | 8 | 3 | 1 |
1015 | 7 | 0 | 6 | 1 | 7 | 15 | 3 | 1 | 0 | 7 | 2 | 15 | 3 | 12 | 5 | 4 | Rabbit | 5 | 13 | 1 |
912 | 6 | 0 | 11 | None | 4 | 13 | 3 | 1 | 3 | 3 | N.A. | 12 | 5 | 6 | 3 | 6 | Monkey | 4 | 12 | 1 |
1818 | 6 | 0 | 9 | 1 | 6 | 18 | 7 | 1 | 0 | 101 | 18 | 18 | 10 | 6 | 4 | 10 | Tiger | 8 | 12 | 1 |
318 | 6 | 0 | 11 | 3 | 6 | 14 | 1 | 1 | 0 | 3 | N.A. | 18 | 8 | 6 | 3 | 7 | Tiger | 5 | 12 | 1 |
2522 | 6 | 0 | 4 | 2 | 11 | 20 | 9 | 1 | 0 | None | 6 | 22 | 7 | 4 | 5 | 6 | Dog | 9 | 18 | 1 |
2709 | 5 | 0 | 11 | 2 | 6 | 20 | A | 1 | 1 | 7 | N.A. | 9 | 7 | 24 | 4 | 8 | Snake | 8 | 4 | 1 |
420 | 6 | 0 | 4 | None | 6 | 15 | 1 | 1 | 0 | 7 | N.A. | 20 | 4 | 6 | 4 | 4 | Monkey | 5 | 12 | 1 |
2008 | 8 | 0 | 10 | 2 | 4 | 24 | 7 | 1 | 0 | None | 0 | 20 | 6 | 12 | 4 | 5 | Rat | 4 | 9 | 1 |
705 | 7 | 0 | 12 | None | 8 | 14 | 2 | 1 | 5 | 5 | N.A. | 7 | 4 | 6 | 4 | 3 | Snake | 5 | 10 | 1 |
1119 | 7 | 0 | 10 | 1 | 4 | 12 | 4 | 1 | 0 | 373 | 3 | 11 | 5 | 4 | 4 | 9 | Pig | 8 | 8 | 1 |
2208 | 4 | 0 | 10 | 2 | 6 | 23 | 8 | 1 | 0 | 3 | 4 | 22 | 8 | 12 | 4 | 6 | Monkey | 7 | 9 | 1 |
201 | 5 | 0 | 3 | 2 | 3 | 13 | C | 1 | 1 | 3 | N.A. | 20 | 3 | 6 | 3 | 2 | Snake | 4 | 3 | 1 |
2115 | 7 | 0 | 7 | 21 | 9 | 14 | 8 | 1 | 1 | 5 | 2 | 21 | 5 | 12 | 5 | 4 | Pig | 8 | 13 | 1 |
1903 | 9 | 0 | 4 | 1 | 5 | 19 | 7 | 1 | 0 | 11 | N.A. | 9 | 6 | 24 | 4 | 8 | Rabbit | 7 | 8 | 1 |
614 | 8 | 0 | 10 | None | 9 | 12 | 2 | 1 | 2 | None | N.A. | 14 | 5 | 6 | 4 | 7 | Dog | 5 | 11 | 1 |
2306 | 6 | 0 | 8 | 2 | 9 | 22 | 9 | 1 | 0 | None | N.A. | 6 | 7 | 24 | 4 | 5 | Dog | 7 | 10 | 1 |
2605 | 7 | 0 | 7 | 2 | 11 | 22 | A | 1 | 1 | 5 | N.A. | 6 | 5 | 24 | 5 | 4 | Rooster | 7 | 10 | 1 |
515 | 5 | 0 | 10 | 5 | 11 | 12 | 2 | 1 | 0 | 5 | 10 | 15 | 3 | 3 | 5 | 3 | Goat | 5 | 13 | 1 |
116 | 6 | 0 | 7 | 1 | 6 | 10 | 7 | 1 | 0 | None | 2 | 16 | 4 | 3 | 3 | 4 | Dragon | 5 | 14 | 1 |
2409 | 7 | 0 | 11 | 2 | 7 | 21 | 9 | 1 | 1 | 11 | N.A. | 24 | 6 | 24 | 5 | 8 | Snake | 7 | 4 | 1 |
1613 | 9 | 0 | 4 | 1 | 9 | 15 | 6 | 1 | 0 | None | 2 | 16 | 7 | 12 | 4 | 8 | Ox | 8 | 11 | 1 |
1409 | 9 | 0 | 10 | 1 | 6 | 18 | 5 | 1 | 0 | None | N.A. | 14 | 5 | 24 | 5 | 9 | Ox | 7 | 4 | 1 |
803 | 7 | 0 | 11 | 8 | 5 | 18 | 3 | 1 | 3 | 11 | N.A. | 8 | 7 | 6 | 3 | 6 | Goat | 4 | 8 | 1 |
1205 | 11 | 0 | 6 | 1 | 8 | 18 | 4 | 1 | 0 | 5 | N.A. | 20 | 4 | 24 | 5 | 4 | Ox | 7 | 10 | 1 |
2814 | 8 | 0 | 6 | 2 | 9 | 18 | A | 1 | 0 | 7 | N.A. | 14 | 9 | 24 | 5 | 9 | Tiger | 8 | 11 | 1 |
1304 | 8 | 0 | 5 | 13 | 8 | 17 | 5 | 1 | 0 | None | N.A. | 4 | 6 | 24 | 5 | 8 | Dragon | 7 | 7 | 1 |
1514 | 6 | 0 | 5 | 1 | 11 | 13 | 5 | 1 | 0 | 757 | 2 | 15 | 5 | 12 | 6 | 8 | Dog | 8 | 11 | 1 |
Upon figuring out the first 28 secret numbers (or earlier), you should notice that the numbers formed by the thousands and hundreds digits are distinct and cover the range 1-28. This gives an ordering, which is simply the usual sorted order. Then, the numbers formed by the tens and units digits are always in the range 1-26, thus are convertible to letters. This forms a secret message, as shown below.
Numbers (sorted) | Last 2 digits | Letter | Numbers (sorted) | Last 2 digits | Letter | Numbers (sorted) | Last 2 digits | Letter | Numbers (sorted) | Last 2 digits | Letter |
---|---|---|---|---|---|---|---|---|---|---|---|
116 | 16 | P | 803 | 3 | C | 1514 | 14 | N | 2208 | 8 | H |
201 | 1 | A | 912 | 12 | L | 1613 | 13 | M | 2306 | 6 | F |
318 | 18 | R | 1015 | 15 | O | 1701 | 1 | A | 2409 | 9 | I |
420 | 20 | T | 1119 | 19 | S | 1818 | 18 | R | 2522 | 22 | V |
515 | 15 | O | 1205 | 5 | E | 1903 | 3 | C | 2605 | 5 | E |
614 | 14 | N | 1304 | 4 | D | 2008 | 8 | H | 2709 | 9 | I |
705 | 5 | E | 1409 | 9 | I | 2115 | 15 | O | 2814 | 14 | N |
The secret message is PART ONE: CLOSED IN MARCH OH FIVE IN. It’s part of the clue for the final answer, but not resolvable by itself.
At this point, if you keep guessing secret numbers, the second secret message you would reveal is the instruction NOW SOLVE PART TWO. If you still keep going, the third secret message is YOU CAN STOP GUESSING NOW. Finally, if you’re persistent enough to work through all 99 secret numbers, the last secret message is HINT: WHY ARE SOME OF THE QUESTIONS USELESS.
This brings us to part 2 of the puzzle. After getting the part 1 of the final clue message PART ONE: CLOSED IN MARCH OH FIVE IN, you need to find part 2. The primary hint for part 2 is the fact that there are some useless questions with only one possible answer across all 3-4 digit secret numbers. This is a fact you should be well aware of after guessing 28 secret numbers. In particular, the two questions
- Sort the digits of your secret number in nonincreasing numerical order to create a new number, subtract your secret number from the new number, and divide the result by 9. What’s the remainder?
- What’s the floor of the base-100 logarithm of your secret number?
each have only one possible answer.
Pondering why there are useless questions may lead you to conjecture that the number of possible answers for each question, across all 3-4 digit numbers, may be relevant. Indeed, these numbers of possible answers all fall in the range 1-26, thus are convertible to letters. This forms the part 2 message, as shown below.
Ques num | Num answers | Letter | Ques num | Num answers | Letter | Ques num | Num answers | Letter | Ques num | Num answers | Letter |
---|---|---|---|---|---|---|---|---|---|---|---|
1 | 16 | P | 6 | 23 | W | 11 | 25 | Y | 16 | 15 | O |
2 | 1 | A | 7 | 15 | O | 12 | 19 | S | 17 | 12 | L |
3 | 18 | R | 8 | 3 | C | 13 | 21 | U | 18 | 11 | K |
4 | 20 | T | 9 | 9 | I | 14 | 6 | F | 19 | 22 | V |
5 | 20 | T | 10 | 20 | T | 15 | 6 | F | 20 | 1 | A |
The part 2 message is PART TWO: CITY SUFFOLK VA.
Combining the part 1 and part 2 messages, we get the final clue CLOSED IN MARCH OH FIVE IN CITY SUFFOLK VA, which resolves to the final answer KINGS HIGHWAY BRIDGE.