My issue
My code
// Update the code below to solve this problem
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 x = read.nextInt();
int y = read.nextInt();
int maxScore;
if (x < y) {
int scoreA = 50 - 2 * x;
int scoreB = 1000 - 4 * x;
maxScore = scoreA + scoreB;
} else {
int scoreA = 50 - 2 * y;
int scoreB = 1000 - 4 * y;
maxScore = scoreA + scoreB;
}
System.out.println(maxScore);
}
}
}
Learning course: Solve Programming problems using Java
Problem Link: CodeChef: Practical coding for everyone