| |
BGonline.org Forums
Exact solution
Posted By: Chuck Bower In Response To: Why people think bots cheat (Jason Lee)
Date: Tuesday, 24 August 2010, at 6:32 p.m.
Is this ("just") eighteen nested do loops and an array of size 216 (sum of nine double sixes) where you populate the array with the sum of the 18 dice as you loop through? That's 6^18 = 10^14 = 100 trillion iterations. Does that take too long? (Use double-long integer arithmetic to save time?)
There may be clever shortcuts since you're only tallying the smaller combinations. E.g. you never need to tally any sequence where 6-6 occurs since the smallest nine rolls where one of them is a double six is 24 + 8*3 = 48.
| |
BGonline.org Forums is maintained by Stick with WebBBS 5.12.