解题思路:
知道大数类的应用
注意事项:
参考代码:
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 人评分
C语言程序设计教程(第三版)课后习题5.7 (C语言代码)浏览:635 |
钟神赛车 (C语言代码)浏览:869 |
C语言训练-求s=a+aa+aaa+aaaa+aa...a的值 (C++代码)(手动优化一下计算)浏览:1277 |
C语言程序设计教程(第三版)课后习题6.11 (C语言代码)for循环浏览:1107 |
兰顿蚂蚁 (C++代码)浏览:1044 |
C语言程序设计教程(第三版)课后习题5.7 (Java代码)浏览:885 |
WU-小九九 (C++代码)浏览:1681 |
【明明的随机数】 (C语言代码)浏览:785 |
愚蠢的摄影师 (C++代码)浏览:933 |
A+B for Input-Output Practice (VII) (C语言代码)浏览:521 |