Majin Vegeta - Quick Code

I have written My Code in Java , it is working properly with exit code 0 , in my IntelliJ IDE , but while submitting here , I get an Runtime error - NZEC .

import java.util.Scanner;
public class Main {

public static void main(String[] args) {

    long N = 100000;
    int primeFactor[] = new int[100000];

    Scanner scan = new Scanner(System.in);
    int t = scan.nextInt();

    for(int i = 0; i<t ; i++ ) {


        for(int k = 0;k<N;k++) {
            primeFactor[k] = 0;
        }


        int n = scan.nextInt();
        int m = scan.nextInt();

        for(int j = 2 ; j < N ; j++) {
            if(primeFactor[j] == 0) {
                for(int e = j ; e < N ; e+=j ) primeFactor[e]++;
            }
        }
        int sum = 0;
        for(int s = n; s < m ; s++ ) {
            sum += primeFactor[s];
        }
        System.out.println(sum);

      }

 }

}

Hi. Your code is correct but its going out of bounds. Change N to 1e6+5 and also size of array to 1e6+5.
here is your AC code