My issue
what if N == 3
My code
import java.util.*;
import java.lang.*;
import java.io.*;
class Codechef
{
public static void main (String[] args) throws java.lang.Exception
{
// your code goes here
Scanner read = new Scanner(System.in);
int T = read.nextInt();
while(T --> 0){
int N = read.nextInt();
if(N==3){
System.out.println();
}
else{
System.out.print(N + "" + (N-2));
for(int i=1 ; i<=N-4 ; i++){
System.out.print(i + "");
}
System.out.print((N-1) + "" + (N-3) + "\n");
}
}
}
}
Learning course: 1400 to 1600 difficulty problems
Problem Link: Average Permutation Practice Problem in - CodeChef