NZRE error in JAVA

can anyone help me out, As I am new to the platform I’m not able to figure out the error!

hey junaid_u,
I was also facing the same issue while submitting my first code on codechef.
I have found a solution which is acceptable to some extend.
if you are using Scanner for taking integer input then before take input check whether the next token is of integer of not by using hasNextInt() function.
eg-
invoke object of scanner class
Scanner ob = new Scanner(System.in);
int n = ob.nextInt(); //this code gives error on codechef so use the bellow code
int n=0
if(ob.hasNextInt())
{ n=ob.nextInt(); }

you can wrapup the above code in one line using ternary operator-
int n = (ob.hasNextInt())?ob.nextInt():0;
hope this helps.
I am facing the same issue when using BufferedInputStream and didn’t find any solution till now so if someone can help me then please you are welcome.