My issue
not getting output
My code
import java.util.*;
import java.lang.*;
import java.io.*;
class Codechef
{
public static void main (String[] args) throws java.lang.Exception
{
Scanner scanner = new Scanner(System.in);
int t = scanner.nextInt();
for(int i=0;i<=t;i++){
int x = scanner.nextInt();
int y = scanner.nextInt();
if(x>=y){
System.out.println(y);
}
else{
System.out.println(2*y-x);
}
}
}
}
Learning course: Basic Math using Java
Problem Link: Candy Store Practice Problem in - CodeChef