package yukicoder; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.PrintWriter; import java.util.StringTokenizer; public class P250 { static long INF = 1000000000000000L+1; static long[][] memo = new long[1501][1501]; public static void main(String[] args) throws IOException { Scanner sc = new Scanner(System.in); PrintWriter pw=new PrintWriter(System.out); for(int i=0; i<1501; i++) memo[i][0] = 1; for(int i=1; i<1501; i++) memo[i][i] = 1; for(int a=1; a<1501; a++) { for(int b=1; b=INF || memo[a-1][b]>=INF) { memo[a][b] = INF; } else { memo[a][b] = memo[a-1][b-1]+memo[a-1][b]; } } } int Q = sc.nextInt(); for(int i=0; i