最差情况下careercup里面的解是
Goal: Create a system for dropping Egg1 so that the most drops required is
consistent, whether Egg1 breaks on the first drop or the last drop 1 A
perfectly load balanced system would be one in which Drops of Egg1 + Drops
of Egg2 is always the same, regardless of where Egg1 broke 2 For that to be
the case, since each drop of Egg1 takes one more step, Egg2 is allowed one
fewer step 3 We must, therefore, reduce the number of steps potentially
required by Egg2 by one drop each time For example, if Egg1 is dropped on
Floor 20 and then Floor 30, Egg2 is potentially required to take 9 steps
When we drop Egg1 again, we must reduce potential Egg2 steps to only 8 eg,
we must drop Egg1 at floor 39 4 We know, therefore, Egg1 must start at
Floor X, then go up by X-1 floors, then X-2, …, until it gets to 100 5
Solve for X+(X-1)+(X-2)+…+1 = 100 X(X+1)/2 = 100 -> X = 14 We go to Floor
14, then 27, then 39, … This takes 14 steps maximum