I am trying to solve a Java problem on CodeChef.
My code runs very fine on my system but shows NZEC on CodeChef.
The same code for C/C++ works fine but not for JAVA
I have searched the internet as much as I could. I tried all the input techniques in Java. Because of such, I couldn’t take part in any Codechef contest as it shows NZEC always.
I have been practicing on Hackerrank and decided to compete on CodeChef. Alas, I might have tried nearly 3-4 days to figure it out but couldn’t.
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 School_of_Geometry.main(Main.java:8)