Skip to content

Instantly share code, notes, and snippets.

View abenezerangelos's full-sized avatar

abenezerangelos

  • Washington State University
View GitHub Profile
aahed
aalii
aargh
aarti
abaca
abaci
abacs
abaft
abaka
abamp
@abenezerangelos
abenezerangelos / doomsday_fuel.py
Created August 9, 2023 09:21 — forked from algomaster99/doomsday_fuel.py
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])):