For this Question: In a pascal triangle starting from top to bottom. Find the value of the element in a given row and column position i.e. ith row and at jth position.The first line of input contains an integer T denoting the number of test cases. Each test case will have two integers indexes of the ith row and jth column provided in the new line.

Constraints:
1 <= T <= 100
0 <= j <= i <= 500
Print the answer for each testcase in separated line. Since the output can be very large, mod your output by 10^9+7.Input:
2
0 0 
2 1

Output:
1
2
Explanation: The Pascal Triangle has first value as 1. (0th row 0th element). The pascal triangle has next set of values as 1 1. (1th row). On the next level, pascal triangle has values 1 2 1. (2nd row). Its 1st element is 2. (0 based)., I have written this Solution Code: import java.io.*;
import java.util.*;



class Main {
    public static void main (String[] args)throws IOException {
        BufferedReader br= new BufferedReader(new InputStreamReader(System.in));
        int T=Integer.parseInt(br.readLine());
        for(int k=0;k<T;k++){
            String[] str=br.readLine().split(" ");
            int i=Integer.parseInt(str[0]);
            int j=Integer.parseInt(str[1]);

            System.out.print(nCr(i,j));
            System.out.println();
        }
    }
    public static long fact(int n){
        long mul=1;
        int m=1000000007;
        for(int i=1;i<=n;i++){
            mul=((mul%m)*i%m)%m;
        }
        return mul;
    }
    public static long nCr(int n,int r){
        int m=1000000007;
        long mul=(fact(r)%m*fact(n-r)%m)%m;
        return ((long)((fact(n)%m)*(pow(mul,m-2,m)%m))%m);
    }
    public static long pow(long a,long b,long m){
        long res=1;
        while(b>0){
            if(b%2!=0)
                res=(long)((res*(a%m))%m);
                a=((a%m)*(a%m))%m;
                b=b>>1;
        }
        return res;
    }
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?