Can you please tell me why NZEC occurs?

public class Main{
public static void main (String[] args) throws java.io.IOException{
java.io.BufferedReader r = new java.io.BufferedReader(new java.io.InputStreamReader (System.in));
int n,k,t,c;
n=Integer.parseInt(r.readLine());
k=Integer.parseInt(r.readLine());
c=0;
for(int i=0;i<n;i++){
t=Integer.parseInt(r.readLine());
if(k!=0){
if((t%k)==0){
c=c+1;
}
}
}
System.out.print©;
}
}

@jvjayavardhan : NZEC error occurs due to an Excpetion thrown by your code .

In context of your code , a runtime error can occur if

Line : n = Integer.parseInt(r.readLine()) ;

If r.readLine() gives “vineet” or “123333333333” it will thrown runtime error since “vineet” is not an integer and second value is out of range for integers .

Similaraly other readlines and consequent parse can give exception

Also if input has ended and you still do r.readLine() you will get “null” as return value and trying to process that will give “runtime” exception .

Also for % and / operators second operator should not be 0 , otherwise runtime exception .

Look for possible source of exceptions within your code to get over runtime error .

Can help you more if you tell me the problem you are trying to solve .