f=lambda n:[1,0][n>0] or f(n-1)*n for i in xrange(2,101,1): r=(f(365))/(f(365-i)) print ("n=%d, p=%.8f")%(i,1-(r/365.0**i))