Java I/O gives error?

,

Can anyone tell me why [CodeChef: Practical coding for everyone](http://My Solution) gives wrong answer?

Looks like the output isn’t flushed - creating the PrintWriter with a second argument to the constructor with value true (enabling autoFlush) seems to do the trick.

Or you could just use System.out.println :slight_smile:

2 Likes

Ohh man :no_mouth::no_mouth: how did I forget it. Thank You brother.

1 Like

But when I had it in custom input it did not gave the error. :thinking::thinking:

Custom Input never does - it just runs the program with the custom input you give it, and tells you what your program output in response (in this case, nothing).

No Passes or Fails - just Input and Output :slight_smile:

1 Like

Thank You Man… this thing is really clearing my doubts …:blush::blush:

1 Like