For this Question: Harry is very confused after knowing all about Sirius. To lighten Harry's mood Sirius asks a fun problem to him. Sirius puts K talking skulls equally spaced on the circumference of a circle. Now he enumerates them from 1 to K in clockwise order. Now given skull X and skull Z, he asks Harry to find number of possible Y such that angle XYZ is obtuse(more than 90 degrees).
Note:- X Y and Z must be different.The first line of the input contains single integer T, denoting number of test cases.
Each test case contains three integers K, X and Z.

Constraints
1 <= T <= 10
1 <= K <= 1000000000
1 <= X, Y <= KFor each testcase print number of possible Y in a new line.Sample Input
2
6 1 3
10 1 5

Sample Output
1
3

Explanation:
For first case, 2 is the suitable skull.
For second case, 2, 3 and 4 are the suitable skulls., I have written this Solution Code: import java.io.*;
import java.util.*;



class Main {
	public static void main (String[] args) throws IOException{

        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        int t = Integer.parseInt(in.readLine());
        while(t-- > 0){
            String str[] = in.readLine().trim().split(" ");
            int k = Integer.parseInt(str[0]);
            int x = Integer.parseInt(str[1]);
            int z = Integer.parseInt(str[2]);
            int cnt = Math.abs(x-z);
            int rem = k - cnt;
            if(cnt < rem){
                if(cnt != 0){
                    System.out.println(cnt-1);
                }
                else{
                    System.out.println(0);
                }
            }
            else if(rem < cnt){
                if(rem != 0){
                    System.out.println(rem-1);
                }
                else{
                    System.out.println(0);
                }
            }
            else{
                System.out.println(0);
            }
        }
    }
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?