Code shows WA although it ran successfully in other compilers.

/* package codechef; // don’t place package name! */

import java.util.*;

/* Name of the class has to be “Main” only if the class is public. */
class Codechef
{
static void solve(int num)
{
String deno = “1”;
int n = num/2;
if(n<1)
deno = “1”;
else{
while(n-- > 0)
deno = deno + “0”;
}
System.out.println(1+" "+deno);
}

public static void main (String[] args) 
{
    int T,N;
	Scanner sc = new Scanner(System.in);
	T=sc.nextInt();
	N=sc.nextInt();
	while(T-- > 0)
	{
	    solve(N);
	}
	
}

}