我遇到了麻烦,我无法做任何事情。我想知道我怎么称呼这种方法?使用BigInteger参数调用方法的问题
public static BigInteger factorial(BigInteger n) {
BigInteger result = BigInteger.ONE;
while (!n.equals(BigInteger.ZERO)) {
result = result.multiply(n);
n = n.subtract(BigInteger.ONE);
}
return result;
}
对于VAR = 1,我知道了,我写了以下内容:
BigInteger kk = BigInteger.ONE;
System.out.println(factorial(kk));
,但我困惑如何计算61!例如。
我通过阅读答案第一.... – Kent 2013-02-18 13:17:03