China Naming Network - Baby naming - The core rules of WeChat grabbing red envelopes

The core rules of WeChat grabbing red envelopes

We often ask for red envelopes in WeChat group, so what are the main rules for grabbing red envelopes? After consulting various materials, the rules are as follows:

For example, if you pay 100 yuan and there are *** 10 red envelopes, then the average value is 10 yuan, and the amount of red envelopes fluctuates between 0.0 1 yuan and 20 yuan.

When the first three red envelopes got to 40 yuan, there were seven red envelopes left in 60 yuan, so the amount of these seven red envelopes was between 0.01~ (60/7 * 2) =17.14.

Note: The algorithm here is to execute the above algorithm for the rest after grabbing one.

This calculation will exceed the total amount at the beginning, so if it is not enough at the end, the following algorithm will be adopted: ensure that the remaining users can get the lowest 1 cent.

If the person in front is unlucky, the more the balance behind, the more red envelopes, so the actual probability is the same.