My issue
What is the problem in this code … it is showing run time error
My code
import java.util.Scanner;
class Codechef
{
public static void main (String[] args)
{
Scanner read = new Scanner(System.in);
int t = read.nextInt();
for(int i=0; i<t; i++)
{
int W = read.nextInt();
int X = read.nextInt();
int Y = read.nextInt();
int Z = read.nextInt();
// Update your code below this line to solve the problem
if((X==W) ||(Y==W) ||(Z==W)|| (X+Y==W)||( X+Z==W)||( X+Y+Z==W)){
System.out.println("YES");
}
else{
System.out.println("NO");
}
}
}
}
Learning course: Solve Programming problems using Java
Problem Link: Practice problem - Weights Practice Problem in Solve Programming problems using Java - CodeChef