A Game of LCM
Submissions: 554   Accuracy:

30.28%

  Difficulty: Medium   Marks: 4

You are given an integer N. You have to find 4 integers i,j,k,l less than equal to N such that lcm(i,j,k,l) is maximum.

Input:
First Line of input contains the number of test cases. Each line of the test case contains a single integer N.

Output:
Print the maximum lcm found.

Constraints:

1<=T<=5*10^4

4<=N<=5*10^4

Example:
Input:
2
4
5

Output:

12
60

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

Author: jain_rishabh


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.