Number Format Exception. NZEC runtime error

Hello coders,

I am new to CodeChef. I want your help. Whenever I am trying to compile any code, the NZEC runtime error occurs. I am facing this issue while taking input using a Scanner or BufferedReader class. It is showing error for the line where I am taking input for the number of test_cases.
If I use if(scanner.hasNext()) before taking input then it works. But I am not able to find a way for BufferedReader class because this class doesn’t have any hasNext() method.
Any type of hint or help is appreciated.

Are you trying to “Run” without Providing “Custom Input”?

Yes, I am trying to run without custom inputs.