从 12345 这个数字中挑选出三个数共有十种方式:
123, 124, 125, 134, 135, 145, 234, 235, 245, 345
在组合学中,我们将其记为 C(5,3)=10。一般地:
可以发现,n = 23 时产生第一个超过一百万的数:C(23,10)=1144066。那么,对于 1≤n≤100
中有多少个 C(n,r)大于一百万(包括重复的在内)?
答案:4075
代码如下:
public static BigInteger [][]C=new BigInteger[101][101];
public static BigInteger []fc=new BigInteger[101];
public static int num()