Practice on Toph

Participate in exhilarating programming contests, solve unique algorithm and data structure challenges and be a part of an awesome community.

The Matrix

By ihumaunkabir · Limits 1s, 512 MB

In the metaphysical world of the Matrix, different people make their chessboards with their own specifications. Sometimes they play multidimensional chess being in multiple positions. For now, let's think that they can choose N x N chessboards and have fun playing chess. While they are having fun, we want to know that if we choose any rectangle from the chessboard, what is the probability that the chosen rectangle is not a square.

Input

The first line of input consists of a single integer T (1T1000)( 1 \leq T \leq 1000 ), next T lines contain an integer N (1N1000)( 1 \leq N \leq 1000 ), the dimension of the chessboard.

Output

Print the probability of choosing a rectangle that is not a square. Errors less than 10410^{-4} will be ignored.

Sample

InputOutput
1
8
0.842593

Discussion

Statistics


94% Solution Ratio

tanvirtareqEarliest, 2M ago

S_SubrataFastest, 0.0s

tanvirtareqLightest, 131 kB

anonyo.akandShortest, 123B

Submit

Login to submit

Editorial

The total probability of a sample space is 1. So if the probability of choosing a square is subtract...

Related Contests

Toph uses cookies. By continuing you agree to our Cookie Policy.