Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python3
# https://www.reddit.com/r/math/comments/8b1z6h/interview_question/
from statistics import mean
from functools import lru_cache
memoize = lru_cache(None)
rolls = tuple((min(i, j), max(i, j))
for i in range(1, 7) for j in range(1, 7) if i+j <= 9)