WA in TOWIN

I am a new user in codechef and trying to submit my first program but getting wrong answer after the submission. Also during runtime i am getting the error “no such element exception”. Dont know why but my program is running successfully in the eclipse IDE.

code solution :- CodeChef: Practical coding for everyone

Kindly help me in this regard.
I tried with try and catch as well.

Are you trying to “Run” without Providing “Custom Input”?

Edit:

Your output for the sample testcase is:

   second
    draw

which has too many spaces - I would hope the Online Judge would filter them out, but I’m not sure.

2 Likes

As you are using Java and , incase you get an NZEC error you can refer to this article =>https://learntheai.blogspot.com/2020/05/how-to-get-rid-of-nzec-error-in-while.html

Hello brother, kindly you see this solution i submitted recently. Check whether it is correct or not.

https://www.codechef.com/viewsolution/36758218

It got WA, so no :slight_smile:

You’re adding a blank first line when there is not supposed to be one.

1 Like

bro again i am getting wrong answer in the following program

https://www.codechef.com/viewsolution/36762418