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.

Secret
number
Q1Q2Q3Q4Q5Q6Q7Q8Q9Q10Q11Q12Q13Q14Q15Q16Q17Q18Q19Q20
17013021513610721751245Snake831
10157061715310721531254Rabbit5131
9126011None4133133N.A.125636Monkey4121
181860916187101011818106410Tiger8121
318601136141103N.A.188637Tiger5121
252260421120910None6227456Dog9181
270950112620A117N.A.972448Snake841
420604None6151107N.A.204644Monkey5121
200880102424710None02061245Rat491
7057012None8142155N.A.74643Snake5101
1119701014124103733115449Pig881
220840102623810342281246Monkey791
2015032313C113N.A.203632Snake431
211570721914811522151254Pig8131
1903904151971011N.A.962448Rabbit781
6148010None912212NoneN.A.145647Dog5111
23066082922910NoneN.A.672445Dog7101
260570721122A115N.A.652454Rooster7101
515501051112210510153353Goat5131
1166071610710None2164334Dragon5141
24097011272191111N.A.2462458Snake741
16139041915610None21671248Ox8111
140990101618510NoneN.A.1452459Ox741
8037011851831311N.A.87636Goat481
1205110618184105N.A.2042454Ox7101
28148062918A107N.A.1492459Tiger8111
130480513817510NoneN.A.462458Dragon771
15146051111351075721551268Dog8111

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
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.

Ques
num
Num
answers
Letter Ques
num
Num
answers
Letter Ques
num
Num
answers
Letter Ques
num
Num
answers
Letter
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.