Description
Input
Output
Sample Input
0
Sample Output
1
HINT
Source
题目我没看,直接看公式和输出要求就开始做了,意思就是求公式。。
明显大数,java搞起
import java.util.*;
import java.math.*;
public class Main{
BigInteger[] Cal = new BigInteger[6000];
void GetCal(){
Cal[0]=BigInteger.ONE;
Cal[1]=BigInteger.ONE;
for(int i=2;i<=5100;i++)
{
BigInteger v1=BigInteger.valueOf(2*i*(2*i-1));
BigInteger v2=BigInteger.valueOf(i*(i+1));
Cal[i]=Cal[i-1].multiply(v1).divide(v2);
}
}
Main()
{
Scanner in = new Scanner(System.in);
int n=in.nextInt();
GetCal();
System.out.println(Cal[n+1]);
}
public static void main(String[] args) {
new Main();
}
}