Sir, I’m using Java to solve the problems, tell me two things.
- In what way I have to take inputs
- What name i have to give to my main class
Please, reply asap. Time is running.
Devendra
Sir, I’m using Java to solve the problems, tell me two things.
Please, reply asap. Time is running.
Devendra
Use bufferedInput for input and name main class as Main
For Java based answers, I recommend the following:
i) Use public access specifier for the class containing main
ii) The class containing main, must be named as Main
iii) For input and output, use BufferedInputStream
and BufferedOutputStream
.
iv)If you wish to test your program the way Codechef tests it, then in your folder, create a file named input.txt
(with all test cases, that is the input given in the program). Then run the commannd java Main < input.txt > output.txt
. You will be able to see your output in output.txt file