SOLVE

LATER

An Unfair Game

Problem

Editorial

Analytics

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 $$

Time Limit:
1.0 sec(s)
for each input file.

Memory Limit:
256 MB

Source Limit:
1024 KB

Marking Scheme:
Marks are awarded when all the testcases pass.

Allowed Languages:
C,
C++,
Clojure,
C#,
D,
Erlang,
F#,
Go,
Groovy,
Haskell,
Java,
Java 8,
JavaScript(Rhino),
JavaScript(Node.js),
Lisp,
Lisp (SBCL),
Lua,
Objective-C,
OCaml,
Octave,
Pascal,
Perl,
PHP,
Python,
Python 3,
R(RScript),
Racket,
Ruby,
Rust,
Scala,
Scala 2.11.8,
Swift,
Visual Basic

Initializing Code Editor...

{"6c4fab1": "/pagelets/problems-hint/algorithm/daal-de-yaha/", "6c4fa5a": "/pagelets/show-submission/algorithm/daal-de-yaha/", "6c4fac6": "/pagelets/recommended-problems/algorithm/daal-de-yaha/", "6c4fa83": "/pagelets/suggested-problems/algorithm/daal-de-yaha/", "6c4fa9b": "/pagelets/problem-author-tester/algorithm/daal-de-yaha/"}

{}

realtime.hackerearth.com

80

8089def11b3377d01e2c5cd8aa3a91fdee39f305

58a29e5cae2309f04b28

/realtime/pusher/auth/