// Arup Guha
// 7/14/10
// Solution for 2010 BHCSI Mock Contest #1 Problem Euler.
// Basically, this program computes a specified number of
// terms in the sum 1 + 1/2^2 + 1/3^2 + ...

import java.util.*;
import java.io.*;

public class euler {
	
	public static void main(String[] args) throws IOException {
		
		Scanner fin = new Scanner(new File("euler.in"));
		
		// Read in the number of input cases.
		int numcases = fin.nextInt();
		
		// Loop through each case.
		for (int cnt=0; cnt < numcases; cnt++) {
			
			// Read in the number of terms to calculate.
			int k = fin.nextInt();
			
			// Sum up all the necessary terms. 
			double sum = 0;
			for (int i=1; i <= k; i++) {
				sum = sum + 1.0/i/i; // 1.0 forces a real division.
			}
			
			// Print out the result.
			System.out.println("The approximation using "+k+" terms is "+sum+"."); 
		}
	}

}