public class T3 {
public static int getNFactorial(int n){
if(n==0){
return 1;
}
return n*getNFactorial(n-1);
}
public static void main(String[] args) {
System.out.println(getNFactorial(3));
}
}
public class Main {
public static void main(String[] args) throws IllegalAccessException {
System.out.println(factorial(3));
}
public static long factorial(long num) throws IllegalAccessException {
if (num < 0) {
throw new IllegalAccessException("输入参数非法");
}
long temp = 1;
for (long i = num; i > 0; i--) {
temp *= i;
}
return temp;
}
}
public class d {
public static void main(String[] args) {
int i = 1;
int s=1;
int n = Integer.parseInt(args[0]);
while (i <= n) {
s=s*i;
i++;
}
System.out.println(s);
}
}