My issue
My code
// The code below is incorrect. Debug the code to solve the 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 a = read.nextInt();
int b = read.nextInt();
if(a%3==0 || b%3==0){
System.out.println(0);
}
else{
if(Math.abs(a-b)%3 == 0){
System.out.println(1);
}
else{
System.out.println(2);
}
}
}
}
}
Learning course: Java for problem solving - 2
Problem Link: CodeChef: Practical coding for everyone