要理解递归,你需要理解递归...
迭代
递归公式
static int Factorial(int n){ 如果 (n > 1) 返回 n * 阶乘(n - 1); 否则返回 1; }
int x = 1; for (int i = 2; i <= n; i++) x = x * 我; Console.WriteLine("%d", x);
K(n)
n
1000 ms 32 Mb Rules for program design and list of errors in automatic problem checking