Birthday Paradox | Python3 code to approximate number of people in Birthday Paradox problem ; Returns approximate number of people for a given probability ; Driver Code
import math NEW_LINE def find ( p ) : NEW_LINE INDENT return math . ceil ( math . sqrt ( 2 * 365 * math . log ( 1 / ( 1 - p ) ) ) ) ; NEW_LINE DEDENT print ( find ( 0.70 ) ) NEW_LINE