Help me in solving BMJ18 problem

My issue

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 a = read.nextInt();
    		int b = read.nextInt();
    		int c=Math.max(a,b);
    		int d=a+b;
    		if(a==0 && b==0)
    		{
    		System.out.println("7");
    		// Update your code below this line to solve the problem

		    }
		System.out.println(d-c);
	}
}

}

Learning course: Solve Programming problems using Java
Problem Link: CodeChef: Practical coding for everyone