怎么用java计算nx(n-1)x(n-2)x...(n-m+1)
z怎么用java计算nx(n-1)x(n-2)x...(n-m+1)
public static Integer compute(Integer n, Integer m) { if (m == 0) { return n; } return (n - (m - 1)) * compute(n,m-1); } public static void main(String[] args) { int n = 1; int m = 1; Integer number = compute(n, m); System.out.println(number); }