Monica's recipes
Tag(s):

Problem
Editorial
Analytics

## Monica's recipes

Monica has been very busy cooking today. She needs to find out how much salt she needs to put in her recipes. She will tell you the weight of her lasagna and you need to tell her the amount. The amount of salt can be calculated by taking the weight W and finding all primes less than or equal to it. The sum of the reciprocal of these primes will give you the exact amount of salt she needs to put. Since she has to make many, many lasagnas, please tell her quickly.

Input:
The first line contains T, the number of test cases.
Each of the subsequent T lines will contain a single integer W, which is the weight.

Output:
For each of the test cases you need to output the answer on a new line.

Constraints:

$1 \leq T \leq 2*10^{5}$

$2 \leq W \leq 10^{5}$

SAMPLE INPUT
1
5
SAMPLE OUTPUT
1.033333
Explanation

1/2 + 1/3 + 1/5 = 1.033333

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: Bash, 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, TypeScript, Visual Basic

## CODE EDITOR

Initializing Code Editor...

## This Problem was Asked in

Challenge Name

Trihacker - IIITA (Mirror)

OTHER PROBLEMS OF THIS CHALLENGE
• Math > Combinatorics