An Unfair Game

0

0 votes
Easy-Medium
Problem

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:

1T10

0KN106

Time Limit: 1
Memory Limit: 256
Source Limit:
Editor Image

?