# D&D 5EDungeons and Dragons puzzle on 538

#### jaelis

##### Oh this is where the title goes?
Edit: note the date, this was from May 15 2020.

Nate Silver's 538 site has a weekly math-based puzzle; today it deals with calculating the odds for advantage and disadvantage. Those who have enjoyed playing with that math should check it out!

Last edited:

#### jaelis

##### Oh this is where the title goes?
If anyone found that interesting, the solution is now posted:

G

#### Guest 6801328

##### Guest
Doh. I read the first post and rushed off to solve it, then went to 538 to post my answer....and realized I was a week late.

#### TwoSix

##### Unserious gamer
Yea, it was pretty easy as far as Riddler puzzles go, took like 2 minutes on Anydice.

#### CodeFlayer

##### Explorer
A computational solution (for the fun of it) - enumerate all outcomes for advantage (2d20)

Code:
from __future__ import print_function

#initialize what will be an array of arrays
a = [0]*20

#populate the array with the largest of i or j
for i in range (0,20):
a[i] = [0]*20 #init
#populate
for j in range (0,20):
a[i][j] =  max(i + 1, j + 1)

#calc average across all values
sum = 0
for i in range (0,20):
for j in range (0,20):
sum += a[i][j]

print (sum / 400.0)

python t1.py 13.825

Replies
136
Views
13K
Replies
0
Views
244
Replies
41
Views
3K
Replies
102
Views
7K
Replies
388
Views
21K