Average Idle-Dice Rolling So I ran into this progressive/idle game cleverly called Idle Dice. Has a variety of random effects applied to a pretty typical progression formula game. Warning, time sink! Play at your own risk.

However after you have 5 dice (summed the usual way) along with some bonuses for various matches (pair, two pair, three of a kind, etc), but after that you eventually get multiplier dice. These five dice are all multiplied against the total rolled by the first five dice and multiplicatively combine with each other.

Even later on you get access to a roulette wheel which can (if it lands on the right wedges) "skip 10 minutes." Sometimes longer, but all intervals are some multiple of 10 minutes.

Your task:

Given the multiplier dice I have, how much will I make when I land on the "skip 10 minutes" wedge of the roulette wheel (figuring I can calculate the 20 minute and 1 hour wedges from there)? We'll ignore any upgraded multipliers and focus solely on the flat base values of each die (incremental games, being what they are, get to obscenely large values in a hurry).

Input


Five values in any reasonable format. Each value represents the number of faces of each of the five multiplier dice.


Missing dice can either be explicitly specified (as 0) or left absent, your choice as long as it is made clear how your program accepts it.
You can assume input values of 0, 2, 4, 6, 8, 10, 12, 20, and 100 will be used.
For example an input of [6,6,4,2] would indicate that there are 2 six-sided multiplier dice, 1 four sided, and 1 two sided, while 6 6 4 2 0 would also be acceptable.



How the dice roll


All ten dice are rolled once a second
The five base dice are summed
The sum is multiplied by each of the five multiplier's dice's face value
That total is multiplied by the score bonus (if any)


The dice


The five basic (six sided) dice will be assumed all present.


Score bonus values:

We'll assume the following score multipliers (which apply to the face results of the base 5 dice, not the multiplier dice):


Pair: 2
Triplet: 7
Two-Pair: 5
Four of a Kind: 60
Straight: 20
Full House (pair + triplet): 30
Five of a Kind: 1500


This page has the odds listed out for the likelyhood of any given result, except a straight for some reason, which is 240/7776 (what's called a Large Straight, rather than a Short Straight).

Note: My original test cases were computed using an incorrect value of 2600/7776 odds for a Pair (correct value should be 3600). Given the existing answers, I am not fixing this.

Output:

Compute the expected average total over a 10 minute period (600 rolls) based on the inputs provided, assuming all dice are uniformly distributed. Output need only be accurate to the nearest whole value, but more precision is allowed.

Test cases

Two extra decimal-fractions of precision included for convenience.

[2] -&gt; 111643.52
[4] -&gt; 186072.53
[6] -&gt; 260501.54
[8] -&gt; 334930.56
[10] -&gt; 409359.57
[12] -&gt; 483788.58
[20] -&gt; 781504.63
[100] -&gt; 3758665.12
[2,2,2] -&gt; 251197.92
[4,2,2] -&gt; 418663.19
[6,6,6] -&gt; 3191143.90
[2,2,2,2,2] -&gt; 565195.31
[6,6,6,6,6] -&gt; 39091512.83
[10,8,6,4,2] -&gt; 24177799.48
[100,20,2,2,2] -&gt; 133197695.3
[100,20,12,2,2] -&gt; 577190013.02
[100,20,12,10,8] -&gt; 6349090143.23
[100,100,100,100,100] -&gt; 24445512498226.80
R, 50 32 bytes

function(M)prod(M/2+.5)*691250/9

Try it online!
-17 Bytes thanks to Nick Kennedy, and thanks to Jonathan Allan for suggesting a precision fix, with no byte loss!
Ignores any missing bonus dice. Just a brute force approach.
Works pretty well, but integers get promoted to doubles once we get past the 2-billion mark (2^31-1), leading to a loss of precision.
Because the &quot;regular&quot; and &quot;bonus&quot; dice are independent, \$E[RB]=E[R]E[B]\$, easing the calculations to simply calculating \$E[B]\$ (which is again the prod of the expected values of each die) and scaling by \$E[R]\$, easily calculated from the given test cases.