Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How does Codechef test whether my solution is correct or not?

codechef solution Test
0
Posted

How does Codechef test whether my solution is correct or not?

1

Your code is tested by a computer automatically, not by a human being, and you have to write your code accordingly. For each problem, Codechef will have one or more input files, each according to the specifications mentioned in the problem statement, and corresponding correct output files. Codechef will run your program on each of the input files by redirecting the standard input stream to an input file, and the standard output stream to another file. The output generated by your program must match the correct output *exactly* in order to be judged correct. Some consequences of this: • If your program starts by printing ‘Enter the number’ and the problem does not tell you to do so, then since this is not part of the correct output, you will be never be judged correct regardless of what the rest of your program does. • As all that matters is that the output files match, it makes no difference at all at what point in your program’s execution that this output is written. So there is no ne

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123