/* * 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. */ package lamps; /** * * @author cteam019 */ import java.util.Scanner; import java.util.ArrayList; import java.util.Collections; import java.util.Set; import java.util.HashSet; public class Lamps { /** * @param args the command line arguments */ public static void main(String[] args) { // TODO code application logic here Scanner sc = new Scanner(System.in); int number = sc.nextInt(); int ar[] = new int[number]; for (int i = 0; i < number; i++) { ar[i] = getNumbers(sc.nextInt()); } for(int i:ar){ System.out.println(i); } } private static int getNumbers(int number) { boolean b = true; boolean a = true; int t = 0; int combinations = 0; for(int x=1;x >= 1;x++){ for(int y = x + 1; y >= x+1;y++){ for(int z = y +1; z>=1;z++){ //System.out.println(t); if(x*y*z<=number){ t=0; combinations++; }else{ t++; break; } } if(t>=2){ break;} } if(t==3){ break;} } return combinations; } }