import java.util.Scanner;
public class JieCheng {
public static int digui(int n){//递归算法(核心)
if (n == 1) {
return n;
}else {
return n * digui( n - 1 );
}
}
public static void main(String args[]){
System.out.println("请输入需要求阶乘的数字(请输入一个整数):");
Scanner in = new Scanner(System.in);
int a = Integer.parseInt(in.nextLine());
System.out.println(digui(a));
}
}