标签:style blog http color java os io strong
1 import java.math.BigInteger; 2 import java.util.Scanner; 3 4 public class Main { 5 6 public static void main(String args[]) { 7 Scanner cin = new Scanner(System.in); 8 BigInteger[] c = new BigInteger[101]; 9 c[1] = BigInteger.valueOf(1); 10 c[2] = BigInteger.valueOf(2); 11 for (int i = 3; i <= 100; i++) { 12 BigInteger x1 = BigInteger.valueOf(4*i-2); 13 BigInteger x2 = BigInteger.valueOf(i+1); 14 c[i]=c[i-1].multiply(x1).divide(x2); 15 } 16 17 while (cin.hasNext()) { 18 int N = cin.nextInt(); 19 if (N==-1) 20 break; 21 else 22 System.out.println(c[N]); 23 } 24 } 25 }
hdu Game of Connections,布布扣,bubuko.com
标签:style blog http color java os io strong
原文地址:http://www.cnblogs.com/fanminghui/p/3891629.html