The Lost Sheep Challenge
nick at leippe.com
Fri Sep 28 16:36:21 MDT 2007
On Friday 28 September 2007, Nicholas Leippe wrote:
> Well, depends on how simple the calculator is. As long as it can represent
> a 100bit number, you can simply examine each sheep and logically or 2^(n-1)
> to your total until the following is true:
> log.2(2^(100) - total) is an even integer--which is the number on the
> missing sheep.
That should be, instead:
log.2(2^100 - 1 - total)
You may note that this method is impervious to double-counting, but does
require you to get each of the 99 at least once.
More information about the PLUG