import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringBuffer sb = new StringBuffer("");
String m="";
BigInteger []catlan=new BigInteger[11];
BigInteger []fact=new BigInteger[21];
fact[0]=BigInteger.ONE;
fact[1]=BigInteger.ONE;
for(int i=2;i<fact.length;i++){
fact[i]=fact[i-1].multiply(BigInteger.valueOf(i));
}
sb.append('{');
for(int i=0;i<catlan.length;i++){
catlan[i]=fact[2*i].divide(fact[i+1].multiply(fact[i]));
if(i>0)
sb.append(',');
sb.append(catlan[i]);
}
sb.append('}');
int i=0;
System.out.print(sb);
}
}
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringBuffer sb = new StringBuffer("");
String m="";
BigInteger []catlan=new BigInteger[11];
BigInteger []fact=new BigInteger[21];
fact[0]=BigInteger.ONE;
fact[1]=BigInteger.ONE;
for(int i=2;i<fact.length;i++){
fact[i]=fact[i-1].multiply(BigInteger.valueOf(i));
}
sb.append('{');
for(int i=0;i<catlan.length;i++){
catlan[i]=fact[2*i].divide(fact[i+1].multiply(fact[i]));
if(i>0)
sb.append(',');
sb.append(catlan[i]);
}
sb.append('}');
int i=0;
System.out.print(sb);
}
}
No comments:
Post a Comment