Checking answers

Is there a way to check the answers codechef is producing for our code?

I get a wrong answer when I try removing the NZEC error(in java).If I could get a detailed report I can debug it easily.Is it possible to do it here as the code runs fine on my local machine?

Answer to your question:

No. Codechef currently doesn’t provide the inputs for which your code doesn’t give the expected
output. You are supposed to look for mistakes in your code and correct them.

My two cents:

Yes, It is easy to debug your code if you know where your code fails.
But, Isn’t it a good exercise for you to figure out a subtle bug in your code ?

You will learn how to reason critically about your code and how it would behave on various inputs.
I think its a critical skill in real world projects, and at least as important as the problem
solving(algorithm) skills.

3 Likes

yeah I figured out now the real cause of those issues :slight_smile:
testing is fun :slight_smile:

Why didn’t you put your title as “Is there a way to check the answers codechef is producing for our code?”