From probabilities rather than counts:
Return P(A∣B)P(A \mid B)P(A∣B).
solve(1/3, 0.5) -> 0.6666666666666666
Sign in to write and run your own code.
solve(...)