高精度之阶乘

package Deom1;
import java.math.BigInteger;
import java.util.Scanner;
import java.util.SortedMap;

public class lx {
public static void main(String [] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
sc.close();
BigInteger b = new BigInteger("1");
for (int i = 2;i <= n;i ++){
b = new BigInteger(i + "").multiply(b);
}
System.out.println(b);
}
}
上一篇:牛顿迭代法


下一篇:java回顾之类API再体验之引用类型小结