Why am I getting runtime exception while reading characters by using read() method and on next line using readLine() method of buffered reader? What can I do to avoid this? Referring CodeChef: Practical coding for everyone problem.
For input in Java try using the custom input classes made by @EgorK . These classes are error free and probably the best known for I/O in Java. Take a look at the sample code here.
@vermashubhang I am using custom input classes only, still getting NZEC. My code runs perfectly in my machine and also on ideone.com , here is the solution for the problem CodeChef: Practical coding for everyone
You can’t share your solution of the ongoing contest as per the rules.
1 Like
I understood the error in my code. I was not beware of this.