Can't Submit My Solution Due To An Error But The Code Works Fine In My Intellij IDEA

import java.io.*;
import java.util.Scanner;

class EnormousInputTest {

public static void main(String[] args) throws IOException {
    Scanner sc= new Scanner(System.in);
    int Number=sc.nextInt();
    int Divisor=sc.nextInt();
    int c=0,i;
    int num;
    for (i = 0; i <Number ; i++) {
        num=sc.nextInt();
        if (num%Divisor==0)
            c++;

    }
    System.out.println(c);
}

}

Error-
Exception in thread “main” java.util.NoSuchElementException
at java.util.Scanner.throwFor(Scanner.java:862)
at java.util.Scanner.next(Scanner.java:1485)
at java.util.Scanner.nextInt(Scanner.java:2117)
at java.util.Scanner.nextInt(Scanner.java:2076)
at EnormousInputTest.main(Main.java:8)

Yup. I was also facing this issue. However I think its a bug. Go ahead and submit the solution(not run it). Your solution is absolutely correct. It would surely be accepted. However @admin please check this bug we are facing in your ide.

can you provide the test case in which you are getting this exception ?

@satyamnoob @brij_raj both of you must have ticked “Custom Input” and left the input box as blank. Either uncheck the option or provide the input according to the format.

i am facing this issue too. The “Custom Input” is not ticked and input box left blank. Works otherwise locally

try{
//your code
}
catch(Exception ex)
{
return;
}