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++,
C++14,
Clojure,
C#,
D,
Erlang,
F#,
Go,
Groovy,
Haskell,
Java,
Java 8,
JavaScript(Rhino),
JavaScript(Node.js),
Julia,
Kotlin,
Lisp,
Lisp (SBCL),
Lua,
Objective-C,
OCaml,
Octave,
Pascal,
Perl,
PHP,
Python,
Python 3,
R(RScript),
Racket,
Ruby,
Rust,
Scala,
Swift,
Swift-4.1,
Visual Basic

Initializing Code Editor...

{"5b03306": "/pagelets/show-submission/algorithm/daal-de-yaha/", "baa96e4": "/pagelets/problems-hint/algorithm/daal-de-yaha/", "f4593fd": "/pagelets/suggested-problems/algorithm/daal-de-yaha/", "579ddf6": "/pagelets/problem-author-tester/algorithm/daal-de-yaha/", "95d5b2e": "/pagelets/recommended-problems/algorithm/daal-de-yaha/"}

realtime.hackerearth.com

80

8089def11b3377d01e2c5cd8aa3a91fdee39f305

58a29e5cae2309f04b28

/realtime/pusher/auth/