Competition version problem

I am unable to take input using import java.util.Scanner; in the competition section as in that java 8 is available wheres in videos java 10 is used. How to take input using scanner.

can u pls send the code
what error its showing

import java.util.*;
public class Main{

public static void main (String[] args) {
	//code
	Scanner scn=new Scanner(System.in);
	int t=scn.nextInt();
	while(t-->0){
	 int n=scn.nextInt();
	 printPatt(n);
	}
}

}

it should be like this

hope this will help u
pls help me by rating my work

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.