Largest LCM
Time Limit: 1 sec
The Problem
Given N, print the largest LCM (Least Common Multiple) of any two i and j where 1 ≤ i, j ≤ N.
For example if N=4 then
LCM(1,1)=1, LCM(1,2)=2, LCM(1,3)=3, LCM(1,4)=4,
LCM(2,1)=2, LCM(2,2)=2, LCM(2,3)=6, LCM(2,4)=4,
LCM(3,1)=3, LCM(3,2)=6, LCM(3,3)=3, LCM(3,4)=12,
LCM(4,1)=4, LCM(4,2)=4, LCM(4,3)=12, LCM(4,4)=4
So, the largest LCM of pairs of numbers between 1 and 4 is 12.
The Input
First line of input will contain the number of test cases, T ≤ 1000. Then T cases follow. For each case, there is a line containing one integer N where 1 ≤ N ≤ 10^5.
The Output
For each case, print one line containing a single integer which is the largest LCM of all pairs of numbers between 1 and N.
Sample Input
2
2
4
Sample Output
2
12
[University Level]
1st Online Programming Contest 2016 by Outsbook
Problem Setter: Shahin ShamS