eolymp
bolt
Try our new interface for solving problems
Problems

Prime Soccer

Prime Soccer

You are watching a soccer match, and you wonder what the probability is that at least one of the two teams will score a prime number of goals. The game lasts \textbf{90} minutes, and to simplify the analysis, we will split the match into five-minute intervals. The first interval is the first five minutes, the second interval is the next five minutes, and so on. During each interval, there is a \textbf{skillOfTeamA} percent probability that first team will score a goal, and a \textbf{skillOfTeamB} percent probability that second team will score a goal. Assume that each team will score at most one goal within each interval. Find the probability that at least one team will have a prime number as its final score. \InputFile Each line contains two integers \textbf{skillOfTeamA} and \textbf{skillOfTeamB} (\textbf{0 ≤} \textbf{skillOfTeamA}, \textbf{skillOfTeamB} \textbf{≤ 100}), describing the percent probability to score a goal for the first and the second team during the five minutes interval. \OutputFile For each test case print in a separate line the probability that at least one team will have a prime number as its final score. Print the probabilities with \textbf{4} digits after the decimal point.
Time limit 1 second
Memory limit 64 MiB
Input example #1
50 50
100 100
12 89
Output example #1
0.5266
0.0000
0.6772