Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
formula solution in Clear category for Pearls in the Box by David_Jones
def checkio(marbles, step):
N, W = len(marbles), marbles.count('w')
P = (1 - (1 - 2 * W / N) * (1 - 2 / N) ** (step - 1)) / 2
return round(P, 2)
May 16, 2019
Comments: