Find the code! It is between 1,000 and 1, and you have 20 tries. You will find whether the code is larger or smaller than the number you entered. It's actually pretty easy using binary search!
Tons of credit to Kinderlabor for the idea.