#include <iostream>
#include <iomanip>
#include <random>
#include <map>

using namespace std;

double p[] =
{
    0.000203775, 0.00060681, 0.00100307, 0.00139256, 0.00177527,
    0.00215121, 0.00252038, 0.00288277, 0.00323839, 0.00358723,
    0.00392931, 0.0042646,  0.00459313, 0.00491488, 0.00522985,
    0.00553806, 0.00583949, 0.00613414, 0.00642202, 0.00670313,
    0.00697747, 0.00724503, 0.00750581, 0.00775983, 0.00800707,
    0.00824753, 0.00848123, 0.00870814, 0.00892829, 0.00914166,
    0.00934826, 0.00954808, 0.00974113, 0.00992741, 0.0101069,
    0.0102796,  0.0104456,  0.0106048,  0.0107572,  0.0109028,
    0.0110417,  0.0111738,  0.0112991,  0.0114176,  0.0115294,
    0.0116344,  0.0117326,  0.011824,   0.0119087,  0.0119866,
    0.0120577,  0.0121221,  0.0121797,  0.0122305,  0.0122745,
    0.0123117,  0.0123422,  0.0123659,  0.0123829,  0.012393,
    0.0123964,  0.012393,   0.0123829,  0.0123659,  0.0123422,
    0.0123117,  0.0122745,  0.0122305,  0.0121797,  0.0121221,
    0.0120577,  0.0119866,  0.0119087,  0.011824,   0.0117326,
    0.0116344,  0.0115294,  0.0114176,  0.0112991,  0.0111738,
    0.0110417,  0.0109028,  0.0107572,  0.0106048,  0.0104456,
    0.0102796,  0.0101069,  0.00992741, 0.00974113, 0.00954808,
    0.00934826, 0.00914166, 0.00892829, 0.00870814, 0.00848123,
    0.00824753, 0.00800707, 0.00775983, 0.00750581, 0.00724503,
    0.00697747, 0.00670313, 0.00642202, 0.00613414, 0.00583949,
    0.00553806, 0.00522985, 0.00491488, 0.00459313, 0.0042646,
    0.00392931, 0.00358723, 0.00323839, 0.00288277, 0.00252038,
    0.00215121, 0.00177527, 0.00139256, 0.00100307, 0.00060681,
    0.000203775
};


int main([[maybe_unused]] int argc,
         [[maybe_unused]] const char* argv[])
{
    default_random_engine gen{random_device{}()};
    uniform_real_distribution<> dis(0.0, 1.0);


    map<int,int> m;

    for(int i = 0; i < 1000000; ++i)
    {
        double r = dis(gen);
        int j = -1; double pr = 0;
        while(r > pr)
        {
            pr += p[++j];
        }

        m[j-60]++;
    }

    for(auto q: m)
    {
        cout << setw(3) << q.first << " ;  " << setw(7) << q.second << endl;
    }

}
