Sorry I didn't explain it better. This is how you would do it for say 4 people:
(364/365)x(363/365)x(362/365)= some number, subtract from 1 to get probability.
For 5 people:
(364/365)x(363/365)x(362/365)x(361/365)=x, then do 1-x
for 6 people:
(364/365)x(363/365)x(362/365)x(361/365)x(360/365)=x, 1-x
So do figure out how far you have to compute it for a certain number of students, you use this formula:
364/365 x 363/365 x362/365 ? 365-n+1/365
So for 5 kids, you go down to 365-n+1, or 365-5+1, so 361/365...which u can see i went to above.
So for 40 kids, you have to keep going down in the fractions all the way to 326/365.