An Unfair Game
Practice
0 (0 votes)
Easy Medium
Problem
65% Success 565 Attempts 30 Points 1s Time Limit 256MB Memory 1024 KB Max Code
Appro and Gupt play a series of games in which the probability of Appro winning each game is 2/5. If they play N games, what is the probability that Gupt will win at least K games?
Input:
The first line of input contains single integer T denoting the number of test cases.
Each test case contains 2 space separated integers K and N as specified in the problem.
Output:
For each test case print the required answer. Output must have exactly 6 digits after decimal.
Constraints:
\( 1\le T \le 10 \)
\(0\le K \le N \le 10^6 \)
Submissions
Please login to view your submissions
Similar Problems
Points:30
11 votes
Tags:
Easy-Medium
Editorial
No editorial available for this problem.