Birthday Paradox

The Birthday Paradox is a well-known probability problem. I don't have a good understanding of the closed-form solution, so I wrote this program to count all possible outcomes for n quantiles of t trials with a threshold r sucesses.

This brute-force approach is not feasible to compute birthday probabilities directly. 365x exponentiation produces more possibilities than you have disk space really quickly.

Input

Output