高精度之阶乘

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);
}
}
posted @ 2020-07-23 08:53  筆尖下的沉默  阅读(122)  评论(0编辑  收藏  举报