解题思路:
知道大数类的应用
注意事项:
参考代码:
public static void main(String[] args) { BigInteger res = cal(1977); System.out.println(res); } public static BigInteger cal(int n) { BigInteger res = BigInteger.ONE; for(int i = 1; i <= n; i++) { res = res.multiply(BigInteger.valueOf(i)); } return res; }
0.0分
0 人评分