the problem assumes there are 365 days you can be born on (ignores leep years and junk)
if there are 365 people in a room, it is possible for each of them to have a different birthday since there are 365 days to have one on.
366 (or more), on the other hand, evaluates to 1.