Special for beginners, ^_^
Please write a recursive function to compute the product 1×2×⋯×n1\times 2\times \cdots \times n1×2×⋯×n.
Input an integer n (1≤n≤20)n\;(1\le n \le 20)n(1≤n≤20).
Output the product 1×2×⋯×n1\times 2\times \cdots \times n1×2×⋯×n.
5
120
1s, 1024KiB for each test case.
注册一个 HiJudge 通用账户,您就可以在我们提供的所有在线评测服务上提交代码、参与讨论。
使用您的 HiJudge 通用账户