Skip to content

Instantly share code, notes, and snippets.

@algomaster99
algomaster99 / doomsday_fuel.py
Created April 24, 2020 11:34
Solution to Doomsday Fuel foobar challenge
from fractions import Fraction
# Replace trials by probabilties of occurrences
def replace_probability(m):
for row in range(len(m)):
total = 0
for item in range(len(m[row])):
total += m[row][item]
if total != 0:
for item in range(len(m[row])):