NZEC Cause?

Hi,
I am trying to solve the following problem.

CW10

But I keep getting NZEC error. Could anyone please point out the cause of the error…
I’ve tried everything…

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.ArrayList;
 
class Main {
    public static void main(String[] args) throws IOException {
	    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	    String str[] = br.readLine().split("-");
	    int start = Integer.parseInt(str[0]), stop = Integer.parseInt(str[1]), count=0;
	    ArrayList a = new ArrayList();
	    for(int i=start;i<=stop;i++) {
			    if(Integer.toString(i).contains(Integer.toString(13))) {
				count++;
			        a.add(i);
			    }
	    }
	    System.out.println("No. of occurrence of 13 is "+count);
	    for(int j=0;j<count;j++)
                System.out.println(a.get(j));
	    return;
    }
}
1 Like

this problem is probably broken (no one got AC on this one, which is kinda … unusual ^^).

moreover, the expected input and output is very very unclear.

you should try to solve another one, unless you are ready to spend a lot of time for it.

1 Like
//