problem description
throw n dice, and the sum of the numbers above is S. Given Given n, list all possible S values and their corresponding probabilities.
sample
given n = 1, return [[1,0.17], [2,0.17], [3,0.17], [4,0.17], [5,0.17], [6,0.17]].
public class Solution {
/**
* @param n an integer
* @return a list of Map.Entry<sum, probability>
*/
public List<Map.Entry<Integer, Double>> dicesSum(int n) {
// Write your code here
// Ps. new AbstractMap.SimpleEntry<Integer, Double>(sum, pro)
// to create the pair
}
}