Am new here.Facing an unexpected error while solving problems!

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 :slight_smile:

Its because CC does not support automatic pre tests .
You can useif( hasNextInt()before scanning the first line of ip :slight_smile:

I am facing a problem that whenever i open my question in codechef then "An unexpected error occurred " is written and question is not opening there…please help me…


…this is the image…please help…me