All problems

Drawing a Red Marble

easyPythonProbability

The parts bin beside the assembly line at Whetcode Precision holds red end caps and blue ones, mixed together. An operator reaches in without looking and takes one. The line manager is writing the work instruction and needs the chance the cap that comes out is red, so she can state how often the operator will have to reach back in for the other colour. The same instruction is issued for every line in the plant, and no two lines stock their bins the same way, so the counts come in with the job.

Every cap in the bin is equally likely to be the one grabbed, and this is a single draw — the operator does not put it back and try again.

Task: Print the probability that the cap drawn is red. Print the value as it comes out, with no rounding step.

Input

The first line holds one integer, the number of red caps in the bin. The second line holds one integer, the number of blue caps. Both are between 0 and 1000, and the bin is never empty.

Output

One line holding the probability, printed the way Python prints a float.

Example:

Input:
5
3

Output:
0.625

Sign in to solve this problem

Reading problems is free for everyone — solving them (Run, Submit, and tracking what you've solved) needs an account.

Sign in

Discussion

Sign in to join the discussion — reading is open to everyone.

Loading comments…