Egg Dropping Puzzle with 2 Eggs and K Floors | Python3 program to find optimal number of trials for k floors and 2 eggs . ; Driver Code
import math as mt NEW_LINE def twoEggDrop ( k ) : NEW_LINE INDENT return mt . ceil ( ( - 1.0 + mt . sqrt ( 1 + 8 * k ) ) / 2 ) NEW_LINE DEDENT k = 100 NEW_LINE print ( twoEggDrop ( k ) ) NEW_LINE