Can anyone please let me know why my code is not being accepted

Please let me know where i am going wrong.

Thanks in advance

// Update the code below to solve this problem
import java.util.Scanner;

class Codechef
public static void main (String[] args)
Scanner read = new Scanner(;

	int t = read.nextInt();
	for(int i=0; i<t; i++)
		int n = read.nextInt();
		int x = read.nextInt();
		int ans=(int)Math.pow(2,x);
	    int y=ans,j;


Hope So this code might be correct I am not allowed to submit the code if you might able to test the code you can test(POV:-I don’t know much about java language)

It worked,Thank you