import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int m = sc.nextInt(); System.out.println(func(n,m)); } // 找到递归的规律(例子):A(9,4) = 9*A(8,3) = 9*8*A(7,2) = .... public static int func(int n, int m){ if(m == 1){ return n; } return n*func(n-1,m-1); } }