NZEC but got submitted as correct answer


import java.util.*;

class CLBATH


public static void main(String args[])


	Scanner sc=new Scanner(;

	int t=sc.nextInt();



		double v1=sc.nextDouble();

		double t1=sc.nextDouble();

		double v2=sc.nextDouble();

		double t2=sc.nextDouble();

		double v3=sc.nextDouble();

		double t3=sc.nextDouble();

		double vreqx=(v3*(t3-t2))/(t1-t2);

		double vreqy=v3-vreqx;








Problem Code: CLBATH

When I click submit it shows correct answer but when I click run it shows NZEC. What’s the problem?

“** but when I click run it shows NZEC. What’s the problem?**”

I assume you mean running it on Codechef IDE. Near submit button, you’ll see a box called **custom input **. Click on that, and copy the sample test case. Now click run. It won’t give NZEC anymore. The reason for the NZEC was that there was no input.

Hope this helped :slight_smile:

So you mean CodeChef doesn’t separate test cases when you click on run like Hackerrank ?

Codechef does have separate test cases which decide the actual outcome of your submission. When you click run, it acts just like your local IDE, where you can provide different test cases and test your program on them.