NZEC Error in every nextInt Method

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

import java.util.;
import java.lang.

/* Name of the class has to be “Main” only if the class is public. */
class Codechef
public static void main (String[] args) throws java.lang.Exception
Scanner sc = new Scanner(;
int l[]=new int[4];
int a=0,b=0,c=0,d=0,ba=0,bb=0,bc=0,bd=0,ca=0,cb=0,cc=0,cd=0,da=0,db=0,dc=0,dd=0;
int t=sc.nextInt();//Line 15
for(int i1=0;i1<t;i1++){
int n=sc.nextInt();
for(int j1=0;j1<n;j1++){
int s=sc.nextInt();

Exception in thread “main” java.util.NoSuchElementException
at java.util.Scanner.throwFor(
at java.util.Scanner.nextInt(
at java.util.Scanner.nextInt(
at Codechef.main(

1 Like