1842: 【CSP函数递归】递归求解n的阶乘▅
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:4
Solved:3
Description
定义函数,递归求解n的阶乘的值。
提示:5!= 5 * 4 * 3 * 2 * 1 = 5 * 4!
规律:n!= n * (n - 1)! A(n) = n * A(n - 1)
Input
输入一个整数n
Output
输出阶乘数列,各数用空格隔开。
Sample Input Copy
5
Sample Output Copy
1 2 6 24 120