import java.util.Scanner;
public class Test1020
{
    public static void main (String[] args)
    {
        Scanner in=new Scanner(System.in);
        int x=in.nextInt();
        System.out.println("输入x次:"+x);
        for (int i=1;i<=x ;i++ )
        {
            int n=in.nextInt();
            System.out.println("输入一个正整数n:"+n);
            double sum=0;
            for (double g=1; g<=n;g++ ) 
            {
                sum=sum+(1/g);
            }
            System.out.println("经过(1+1/2+1/3+......+1/n)计算结果为:"+sum);
        }
    }
}