Hello everyone,
I am totally new to CodeChef and just started looking at the problems to solve them. But, to my surprise, I encountered an unexpected error - while trying to take the input for first line (number of test cases T) for Java code, it says there is no input from the system. (
java.util.NoSuchElementException ). When I tried giving my own input in a custom test run, it easily scans my input through scanner object though! Any help would be appreciated.
It’s because codechef online ide doesn’t support automatic pretests like hackerrank or hacerearth, you have to always give it manually (as custom test).
2 Likes
I see. Thanks for helping me out
Its because CC does not support automatic pre tests .
You can useif( hasNextInt()
before scanning the first line of ip