Unable to scan input in java

I am trying DSTAPLS. My code is running fine with custom inputs but when I try running my code without custom inputs, it is not at all scanning the inputs. I wonder if I am unaware of the input format against which our code is tested here at codeChef. Any help would be appreciated. New to this platform.

1 Like

Um… If your code does not have any input provided to it, then I guess it cannot scan the input from anywhere.

About the input format, the test data of the problem will be provided with the exact input format as in the sample input. Also you should not print unnecessary lines such as “Enter the value of n” etc. You can use either Scanner or BufferedReader class for taking input in Java, but I suggest that you should use the BufferedReader class for taking input as it is marginally faster than Scanner class.

2 Likes

Thanks for suggesting a way. I will try doing it:)

1 Like

I am having the same issue. Did you solve it?