LCM Triplet
Submissions: 1051   Accuracy:

12.7%

  Difficulty: Medium   Marks: 4

Given an integer N find the maximum possible LCM of any three numbers less than equal to N. 

Input:
First line of input contains of an integer 'T' denoting number of test cases .Then T test case follow Only line of each test case contains an integer N .

Output:
For each case print an integer corresponding to the answer .


Constraints:
1<=T<=80
1<=N<=10^6


Constraints:

Input:

2
9
7

Output:
504
210

 

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Hardik Gulati
Author: hardikgulati96


If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.


to report an issue on this page.