using System; using System.Collections.Generic; using System.IO; using System.Linq; class Solution { static void Main(String[] args) { int t = Convert.ToInt32(Console.ReadLine()); for(int a0 = 0; a0 < t; a0++){ int n = Convert.ToInt32(Console.ReadLine()); Console.WriteLine(TripletOn(n)); } } static double Triplet(int n) { double max=0; if(n<=0) return -1; for(double i=1; imax) { max=z; } } } } return max>0 ? max:-1; } static long TripletOn(int n) { long product = -1; for(int a = 1; a <= n / 3; a++) { int b = (n * n - 2 * n * a)/(2 * n - 2 * a); int c = n - a - b; if(a * a + b * b == c * c) { if(a * b * c > product) product = a * b * c; } } return product; } }