How to analyze the points of n dice in big data
Big data in how to analyze n dice points, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain for you in detail, people with this need can come to learn, I hope you can gain something.
Throw n dice on the ground and the sum of the points on one side of all the dice is s. Enter n to print out the probability of occurrence of all possible values of s.
You need to return the answer with a floating-point array, where the I element represents the probability of the smaller I of the set of points that the n dice can throw.
Example 1:
Enter: 1
Output: [0.16667, 0.16667]
Example 2:
Enter: 2
Output: [0.02778, 0.05556, 0.08333, 0.11111, 0.13889, 0.16667, 0.13889, 0.11111, 0.08333, 0.05556, 0.02778]
Restrictions:
one