Calculate the probability that at least two people in a group share the same birthday. Given an integer input n, return to 0.015 (1.5%) precision the probability of this being the case. Assume that every day is equally probable as a birthday and ignore the leap year.
Example:
Input: 1 Output: 0.00
Input: 366 Output: 1.00
I assume n is the number of people in the room.....
Although I got the solution, in the case of n=100, however, it results in 1.000, which means there MUST be at least two people share their birthday in a group of 100. Am I missing something here?
Given an unsigned integer x, find the largest y by rearranging the bits in x
549 Solvers
Equidistant numbers containing certain value in an interval
72 Solvers
Sum the entries of each column of a matrix which satisfy a logical condition.
117 Solvers
156 Solvers
420 Solvers