Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Creative category for Pearls in the Box by gflegar
p=lambda n,w,b: w>=0 and b>=0 and n>0 and(w*(n==1 or p(n-1,w-1,b+1))+b*(n>1)*p(n-1,w+1,b-1))/(w+b)
checkio=lambda m,s:round(float(p(s,m.count('w'),m.count('b'))),2)
June 4, 2014
Comments: