import java.math.BigInteger;
import java.util.Scanner;
public class Test {
public static void main(String[] args) {
int j = 0;
System.out.println("请输入数字:"); //提示输入
Scanner input=new Scanner(System.in);
j = input.nextInt();
BigInteger result = new BigInteger("1");//为result赋初始值,为1
for (int i = 1; i <= j; i++) {
BigInteger num = new BigInteger(String.valueOf(i));
result = result.multiply(num);//调用自乘方法
}
System.out.println(result);//输出结果
System.out.println(String.valueOf(result).length());//输出长度
}
}