解题思路:
知道大数类的应用
注意事项:
参考代码:
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 人评分
点我有惊喜!你懂得!浏览:1435 |
2005年春浙江省计算机等级考试二级C 编程题(3) (C语言代码)浏览:390 |
C语言训练-求素数问题 (C语言代码)浏览:1457 |
【密码】 (C语言代码)浏览:333 |
C语言程序设计教程(第三版)课后习题9.6 (C语言代码)浏览:277 |
剪刀石头布 (C语言代码)不知道怎么直接在scanf中用枚举变量浏览:1316 |
拆分位数 (C语言代码)浏览:1328 |
WU-陶陶摘苹果2 (C++代码)浏览:975 |
C语言程序设计教程(第三版)课后习题6.2 (C语言代码)浏览:711 |
字符逆序 (C语言代码)浏览:646 |