Problem descriptionas we all know the train problem I, the boss of the Ignatius Train Station want to know if all the trains come in strict-increasing order, how many orders that all the trains can get out of the railway.
Inputthe input contains several test cases. Each test cases consists of a number N (1 <= n <= 100). The input is terminated by the end of file.
Outputfor each test case, You shocould output how many ways that all the trains can get out of the railway.
Sample Input
12310
Sample output
Written in 12516796java .... AC code: http://blog.csdn.net/smallacmer/article/details/7770855Import Java. util. *; import Java. math. biginteger; public class main {/*** @ Param ARGs */public static void main (string [] ARGs) {// todo automatically generates the method stub biginteger num [] = new biginteger [105]; num [1] = biginteger. one; num [2] = biginteger. valueof (2); num [3] = biginteger. valueof (5); For (INT I = 4; I <105; I ++) {biginteger B = biginteger. valueof (4); B = B. multiply (biginteger. valueof (I )). subtract (biginteger. valueof (2); num [I] = num [I-1]. multiply (B ). divide (biginteger. valueof (I + 1);} else CIN = new partition (system. in); int N; while (CIN. hasnext () {n = cin. nextint (); system. out. println (Num [N]) ;}}