#include <iostream>
#include <iomanip>

double compute_p(double n, double c) {
    double ndc = n - c, p = 1;
    for(int i = 0; i < 4 ; ++i, --ndc, --n) { p *= ndc/n; }
    return 1 - p;
}

int main() {
    std::cout << std::setprecision(3);
    constexpr int nmin = 45, nmax = 53;
    constexpr int cmin = 15, cmax = 30;
    std::cout << "c\\n\t";
    for(int n = nmin ; n <= nmax ; ++n)
        std::cout << "   " << std::setw(4) << n;
    std::cout << '\n';
    for(int c = cmin ; c <= cmax ; ++c) {
        std::cout << c << '\t';
        for(int n = nmin; n <= nmax ; ++n) {
        	std::cout << "  " << std::setw(4) << compute_p(n, c)*100 << '%';
        }
        std::cout << '\n';
    }
}