Company: juspay_17oct
Difficulty: medium
Candy Jar Problem Description Two siblings, Sam and Nina, are playing with a jar of candies. The jar contains w sweet candies (white) and b sour candies (black). Nina always takes the first turn, and then they alternate. The first person to get a sweet candy wins the game. But there's a twist: Whenever Sam grabs a candy, the jar shakes and one random candy falls out onto the floor (this never happens on Nina's turn). Candies that fall out on their own are ignored-they don't belong to anyone and don't decide the winner. Once a candy is out, it cannot be put back. If the jar becomes empty and no sweet candy has been eaten, Sam automatically wins. Every candy has an equal chance of being picked, and on Sam's turn, each remaining candy has the same chance of falling out. Input A single line with two integers w and b. Output Print the probability that Nina wins. Round the final output rounded off to exactly three decimal places. Constraints 1 <= w, b <= 1000 Examples Example 1: Input: