Birthday Paradox | Returns approximate number of people for a given probability ; Driver code
function find ( p ) { return Math . ceil ( Math . sqrt ( 2 * 365 * Math . log ( 1 / ( 1 - p ) ) ) ) ; } document . write ( find ( 0.70 ) ) ;