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.

  1. If your secret number is written in base 3, what’s the sum of its digits (give the answer in base 10)?
  2. 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?
  3. What’s the sum of the first and last digits of your secret number?
  4. What’s the largest Fibonacci number that can be found as a prefix substring of your secret number? (If there is none, answer “None”.)
  5. How many dots are used in the Morse code representation of your secret number?
  6. How many segments are lit in the standard seven-segment display of your secret number?
  7. If your secret number is written in hexadecimal, what’s its first digit?
  8. 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)?
  9. What’s the remainder when your secret number is divided by its leftmost digit?
  10. What’s the largest odd prime divisor of your secret number that’s also a palindrome? (If there is none, answer “None”.)
  11. 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”.)
  12. What’s the highest MIT Course number that is a substring of your secret number?
  13. 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.)
  14. How many distinct permutations are there of the digits of your secret number? (The permutation may begin with 0.)
  15. 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?
  16. 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.)
  17. What’s the Chinese zodiac animal of the year represented by your secret number?
  18. How many syllables does it take to say your secret number (in the standard way to write the number in English)?
  19. 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.)
  20. 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.


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.

Last 2
Letter Numbers
Last 2
Letter Numbers
Last 2
Letter Numbers
Last 2
11616P 8033C 151414N 22088H
2011A 91212L 161313M 23066F
31818R 101515O 17011A 24099I
42020T 111919S 181818R 252222V
51515O 12055E 19033C 26055E
61414N 13044D 20088H 27099I
7055E 14099I 211515O 281414N

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

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.

Letter Ques
Letter Ques
Letter Ques
116P 623W 1125Y 1615O
21A 715O 1219S 1712L
318R 83C 1321U 1811K
420T 99I 146F 1922V
520T 1020T 156F 201A

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.