NZEC but got submitted as correct answer

import java.io.*;

import java.util.*;

class CLBATH

{

public static void main(String args[])

{

	Scanner sc=new Scanner(System.in);

	int t=sc.nextInt();

	while(t-->0)

	{

		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;

		if(vreqx>=0&&vreqx<=v1&&vreqy>=0&&vreqy<=v2)

			System.out.println("YES");

		else

			System.out.println("NO");

	}

}

}

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.