eolymp
bolt
Спробуйте наш новий інтерфейс для відправки розв'язків
Задачі

Strong-Willed Victory

Strong-Willed Victory

Yuri loves football. He is very happy when his favorite team wins. He is even happier when this is a strong-willed victory. A strong-willed victory is an outcome when the team wins, but was losing at least at one moment during the match. Recently Yuri learned the result of the last match of his favorite team: it won. He doesn't know how the score developed and now he is interested what is the probability that this was a strong-willed victory. Help Yuri calculate this. We will assume that any scenario of the match is equally probable. The scenario of the match is determined by the sequence in which the teams score goals. \InputFile The input file consists of two integers: \textbf{a} - the number of goals Yuri's favorite team scored and \textbf{b} - the number of goals scored by the rival team. (\textbf{0} ≤ \textbf{b} < \textbf{a} ≤ \textbf{1000000}). \OutputFile Print the probability that the last match of Yuri's favorite team was a strong-willed victory with six digits after the dot. One of the three possible match scenarios is a strong-willed victory: when the rival team scores first. For the other two scenarios Yuri's favorite team isn't losing for a single moment.
Ліміт часу 1 секунда
Ліміт використання пам'яті 64 MiB
Вхідні дані #1
2 1
Вихідні дані #1
0.333333
Джерело International Collegiate Programming Contest, Ukraine, Quarter-Final,May 19, 2011