Life or death?

You are a worker for an emperor. All he will ask for is to guess his number. It is in between 1 and 549,755,813,888. You can ask if it is more or less than a certain number and he will respond. What is the minimum number of questions you could ask with being guaranteed of winning?

FYI: You will die if you take any unnecessary moves.


The answer is 39.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Ossama Ismail
Nov 20, 2020
Karthick Shiva
Dec 24, 2015

U will require log2(549,755,813,888) = 39 comparisons...

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...