/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; /** * * @author cteam030 */ public class Lamps { /** * @param args the command line arguments */ public static void main(String[] args) { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int[] result = new int[1000001]; int milion = 1000000; int maxI = milion / 2; for (int i = 1; i <= maxI; i++) { int maxJ = milion / i; for (int j = i+1; j <= maxJ; j++) { int tmp = i*j; int maxK = milion / tmp; for (int k = j+1; k <= maxK; k++) { result[tmp*k]++; } } } for (int i = 1; i < result.length; i++) { result[i] += result[i - 1]; } try { int count = Integer.parseInt(br.readLine()); for (int i = 0; i < count; i++) { System.out.println(result[Integer.parseInt(br.readLine())]); } } catch (Exception e) {} } }