I understood the problem but my solution is not working when p=1 so what should I do?
https://ide.codingblocks.com/#/s/13094 This is the link to my solution.
Birthday Paradox
When p = 1, you should handle this case explicitly.
It means you will need atleast 366 people to make sure that atleast 2 have birthday on the same day in a 365 day year.
1 Like