In one of the Squid Game challenges, the Masked Guards randomly shuffle the players into a single line. However, only those players who remain in their original positions after the shuffle will survive. These survivors are the fixed points.
You are tasked with determining the expected number of survivors—the number of players who remain in their original positions after a random shuffle of the players.
You are given $$$t$$$ test cases. For each test case, you are given a single integer $$$n$$$, representing the number of players in the line-up. The Masked Guards shuffle the players into any possible permutations, each being equally likely. A fixed point (or survivor) is a position $$$i$$$ in the shuffled list where the player $$$i$$$ remains in the same position as their original number $$$i$$$.
Your task is to calculate the expected value of the number of survivors (fixed points) in a random shuffle of $$$n$$$ players for each test case.
The first line contains a single integer $$$t$$$ ($$$1 \leq t \leq 10^{5}$$$), the number of test cases.
Each of the next $$$t$$$ lines contains a single integer $$$n$$$ ($$$1 \leq n \leq 10^{7}$$$), representing the number of players in the line-up.
It is guaranteed that the sum of all $$$n$$$ across the $$$t$$$ test cases does not exceed $$$10^{7}$$$.
For each test case, output a single floating-point number, the expected number of survivors (fixed points), with an absolute or relative error of at most $$$10^{-6}$$$
212
1.0000000 1.0000000