标签:百度 stat bottom author ber station 代码 nsis limit
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
import java.util.*; import java.math.*; public class Main { public static void main(String[] args) { Scanner cin = new Scanner(System.in); BigInteger[] a=new BigInteger[110]; a[0]=new BigInteger("1"); for(int i=1;i<=100;i++) { int h=4*i-2; int d=i+1; String b="",c=""; int[] k=new int[10]; int flag=0; while(h!=0) { k[flag++]=h%10; h/=10; } for(int j=flag-1;j>=0;j--){ b+=k[j]; } a[i]=a[i-1].multiply(new BigInteger(b)); flag=0; while(d!=0) { k[flag++]=d%10; d/=10; } for(int j=flag-1;j>=0;j--){ c+=k[j]; } a[i]=a[i].divide(new BigInteger(c)); } int n; while(cin.hasNext()) { n=cin.nextInt(); System.out.println(a[n]); } } }
标签:百度 stat bottom author ber station 代码 nsis limit
原文地址:http://www.cnblogs.com/jhz033/p/6011339.html