My issue
Hey the code is correct and I am getting correct output too but I am geeting wrong while I submit my code
My code
/* package codechef; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Codechef
{
public static void main (String[] args) throws java.lang.Exception
{
// your code goes here
Scanner sc=new Scanner(System.in);
int t=sc.nextInt();
for(int I=1;I<=t;I++)
{
float x1=sc.nextInt();
float x2=sc.nextInt();
float x3=sc.nextInt();
float v1=sc.nextInt();
float v2=sc.nextInt();
float t0=(x3-x1)/v1;
float t1=(x2-x3)/v2;
if(t0<t1)
{
System.out.println("chef");
}
else if(t0>t1)
{
System.out.println("kefa");
}
else
{
System.out.println("draw");
}
}
}
}
Problem Link: CHEFRUN Problem - CodeChef