Premium problem78. Second Draw Given the First

Easy Locked

An urn holds red red balls and blue blue ones. You draw two without replacement. Given that the first was red, return the probability the second is also red.

Once the first red is out of the urn, both counts have changed. No Bayes needed, just recount what is left.

Input

red = 5
blue = 5

Output

0.4444444444444444

Premium problem

This one's part of Premium. Unlock the full Probability track plus every other premium problem on the site.

Implement solve(...)